public abstract class StaticResourceServlet
extends HttpServlet
Generic servlet for serving static content by jPALIO.
Main features:
Modifier and Type | Class and Description |
---|---|
static class |
StaticResourceServlet.StaticResource
Representation of resource to serve.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
serveNotFound |
Constructor and Description |
---|
StaticResourceServlet() |
Modifier and Type | Method and Description |
---|---|
protected void |
doGet(HttpServletRequest request,
HttpServletResponse response) |
protected void |
doHead(HttpServletRequest request,
HttpServletResponse response) |
protected void |
doPost(HttpServletRequest request,
HttpServletResponse response) |
protected abstract StaticResourceServlet.StaticResource |
getStaticResource(HttpServletRequest request,
HttpServletResponse response)
Gets static resource from any source (file system, database) based on given request.
|
protected abstract StaticResourceServlet.StaticResource getStaticResource(HttpServletRequest request, HttpServletResponse response) throws java.io.IOException
request
- Requestjava.io.IOException
- If problem occurs while getting resource from the source.protected void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
ServletException
java.io.IOException
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
ServletException
java.io.IOException
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
ServletException
java.io.IOException