Package org.dlese.dpc.util.uri
Class UriSpoofServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.dlese.dpc.util.uri.UriSpoofServlet
- All Implemented Interfaces:
Serializable,Servlet,ServletConfig
Utility servlet for mapping "static" URIs (.htm) to dynamic requests (.do?)
using regular expressions
- Author:
- Ryan Deardorff
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoGet(HttpServletRequest request, HttpServletResponse response) Look at the requested URI and translate it to dynamic (but hidden to client) requestvoiddoPost(HttpServletRequest request, HttpServletResponse response) Hand control off to doGet (to easily support both at once)voidinit(ServletConfig config) Initialize the servletMethods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
UriSpoofServlet
public UriSpoofServlet()
-
-
Method Details
-
init
Initialize the servlet- Specified by:
initin interfaceServlet- Overrides:
initin classGenericServlet- Parameters:
config-- Throws:
ServletException
-
doGet
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException Look at the requested URI and translate it to dynamic (but hidden to client) request- Overrides:
doGetin classHttpServlet- Parameters:
request-response-- Throws:
ServletExceptionIOException
-
doPost
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException Hand control off to doGet (to easily support both at once)- Overrides:
doPostin classHttpServlet- Parameters:
request-response-- Throws:
ServletExceptionIOException
-