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 voiddoGet(HttpServletRequest request, HttpServletResponse response) Handles the HTTPGETmethod.protected voiddoPost(HttpServletRequest request, HttpServletResponse response) Handles the HTTPPOSTmethod.Returns a short description of the servlet.protected voidprocessRequest(HttpServletRequest request, HttpServletResponse response) Processes requests for both HTTPGETandPOSTmethods.Methods inherited from class HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, init, service, serviceMethods 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 HTTPGETandPOSTmethods.- 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 HTTPGETmethod.- Overrides:
doGetin 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 HTTPPOSTmethod.- Overrides:
doPostin 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:
getServletInfoin interfaceServlet- Overrides:
getServletInfoin classGenericServlet- Returns:
- a String containing servlet description
-