Package org.bluezoo.gumdrop.servlet
Class DefaultServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.bluezoo.gumdrop.servlet.DefaultServlet
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class DefaultServlet
extends javax.servlet.http.HttpServlet
Default servlet for a Web application. This serves resources in the
servlet context.
- Author:
- Chris Burdess
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected voiddoHead(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected voiddoOptions(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) protected final StringgetPath(javax.servlet.http.HttpServletRequest request) Returns the complete path of the request relative to the web application root, not including any query portion.protected URLgetResource(javax.servlet.http.HttpServletRequest request, String path, javax.servlet.ServletContext context) Returns the resource URL for the given request.protected final booleanisCollection(String path) Determines if the specified path refers to a static collection in the web application.protected final booleanIndicates whether the specified path refers to a file in the WEB-INF or META-INF resource hierarchies, which must result in a 404 (SRV.9.5, SRV.9.6).protected voidservice(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doPost, doPut, doTrace, getLastModified, serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, init, init, log, log
-
Constructor Details
-
DefaultServlet
public DefaultServlet()
-
-
Method Details
-
getServletName
- Specified by:
getServletNamein interfacejavax.servlet.ServletConfig- Overrides:
getServletNamein classjavax.servlet.GenericServlet
-
service
protected void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Overrides:
servicein classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doOptions
protected void doOptions(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Overrides:
doOptionsin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doHead
protected void doHead(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Overrides:
doHeadin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Overrides:
doGetin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
getResource
protected URL getResource(javax.servlet.http.HttpServletRequest request, String path, javax.servlet.ServletContext context) throws IOException Returns the resource URL for the given request.- Throws:
IOException
-
getPath
Returns the complete path of the request relative to the web application root, not including any query portion. -
isCollection
Determines if the specified path refers to a static collection in the web application. -
isWebInf
Indicates whether the specified path refers to a file in the WEB-INF or META-INF resource hierarchies, which must result in a 404 (SRV.9.5, SRV.9.6).
-