Class RedirectingServlet
Object
GenericServlet
HttpServlet
RedirectingServlet
- All Implemented Interfaces:
Servlet
,ServletConfig
,Serializable
@WebServlet(name="RedirectingServlet",
urlPatterns={"/blogs/*","/templates/*","/systemlog/*","/rooms/*","/methods/*","/commands/*","/areas/*","/items/*","/ban/*","/manpages/*","/events/*","/attributes/*","/worldattributes/*","/characters/*","/boards/*","/guilds/*"})
public class RedirectingServlet
extends HttpServlet
Takes care to send the index.html file of Angular, so Angular routing can be
done with bookmarks.
- Author:
- maartenl
- See Also:
-
Field Summary
Fields inherited from class HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doGet
(HttpServletRequest request, HttpServletResponse response) Handles the HTTPGET
method.protected void
doPost
(HttpServletRequest request, HttpServletResponse response) Handles the HTTPPOST
method.Returns a short description of the servlet.protected void
processRequest
(HttpServletRequest request, HttpServletResponse response) Processes requests for both HTTPGET
andPOST
methods.Methods inherited from class HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, init, service, service
Methods inherited from class GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
-
Constructor Details
-
RedirectingServlet
public RedirectingServlet()
-
-
Method Details
-
processRequest
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException Processes requests for both HTTPGET
andPOST
methods.- Parameters:
request
- servlet requestresponse
- servlet response- Throws:
ServletException
- if a servlet-specific error occursIOException
- if an I/O error occurs
-
doGet
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException Handles the HTTPGET
method.- Overrides:
doGet
in classHttpServlet
- Parameters:
request
- servlet requestresponse
- servlet response- Throws:
ServletException
- if a servlet-specific error occursIOException
- if an I/O error occurs
-
doPost
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException Handles the HTTPPOST
method.- Overrides:
doPost
in classHttpServlet
- Parameters:
request
- servlet requestresponse
- servlet response- Throws:
ServletException
- if a servlet-specific error occursIOException
- if an I/O error occurs
-
getServletInfo
Returns a short description of the servlet.- Specified by:
getServletInfo
in interfaceServlet
- Overrides:
getServletInfo
in classGenericServlet
- Returns:
- a String containing servlet description
-