Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.mortbay.jetty.servlet.Default
public class Default
extends HttpServlet
acceptRanges If true, range requests and responses are supported dirAllowed If true, directory listings are returned if no welcome file is found. Else 403 Forbidden. putAllowed If true, the PUT method is allowed delAllowed If true, the DELETE method is allowed redirectWelcome If true, welcome files are redirected rather than forwarded to. minGzipLength If set to a positive integer, then static content larger than this will be served as gzip content encoded if a matching resource is found ending with ".gz" resourceBase Set to replace the context resource base relativeResourceBase Set with a pathname relative to the base of the servlet context root. Useful for only serving static content out of only specific subdirectories.The MOVE method is allowed if PUT and DELETE are allowed
Method Summary | |
protected Resource |
|
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
protected boolean |
|
protected void |
|
protected void |
|
protected void |
|
protected void |
|
Methods inherited from class javax.servlet.http.HttpServlet | |
doDelete , doGet , doHead , doOptions , doPost , doPut , doTrace , getLastModified , service , service |
Methods inherited from class javax.servlet.GenericServlet | |
destroy , getInitParameter , getInitParameterNames , getServletConfig , getServletContext , getServletInfo , getServletName , init , init , log , log , service |
protected Resource getResource(String pathInContext) throws IOException
get Resource to serve. Map a path to a resource. The default implementation calls HttpContext.getResource but derived servlets may provide their own mapping.
- Parameters:
pathInContext
- The path to find a resource for.
- Returns:
- The resource to serve.
public void handleDelete(HttpServletRequest request, HttpServletResponse response, String pathInContext, Resource resource) throws ServletException, IOException
public void handleGet(HttpServletRequest request, HttpServletResponse response, String pathInContext, Resource resource, boolean endsWithSlash) throws ServletException, IOException
public void handleMove(HttpServletRequest request, HttpServletResponse response, String pathInContext, Resource resource) throws ServletException, IOException
public void handleOptions(HttpServletRequest request, HttpServletResponse response) throws IOException
public void handlePut(HttpServletRequest request, HttpServletResponse response, String pathInContext, Resource resource) throws ServletException, IOException
public void init() throws UnavailableException
A convenience method which can be overridden so that there's no need to callsuper.init(config)
. Instead of overridingGenericServlet.init(ServletConfig)
, simply override this method and it will be called byGenericServlet.init(ServletConfig config)
. TheServletConfig
object can still be retrieved viaGenericServlet.getServletConfig()
.
- Overrides:
- init in interface GenericServlet
protected boolean passConditionalHeaders(HttpServletRequest request, HttpServletResponse response, Resource resource) throws IOException
protected void sendData(HttpServletRequest request, HttpServletResponse response, String pathInContext, Resource resource) throws IOException
protected void sendDirectory(HttpServletRequest request, HttpServletResponse response, Resource resource, boolean parent) throws IOException
protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
- Overrides:
- service in interface HttpServlet
protected void writeHeaders(HttpServletResponse response, Resource resource, long count) throws IOException