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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doGet(HttpServletRequest request, HttpServletResponse response)
    Handles the HTTP GET method.
    protected void
    doPost(HttpServletRequest request, HttpServletResponse response)
    Handles the HTTP POST method.
    Returns a short description of the servlet.
    protected void
    processRequest(HttpServletRequest request, HttpServletResponse response)
    Processes requests for both HTTP GET and POST 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

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RedirectingServlet

      public RedirectingServlet()
  • Method Details

    • processRequest

      protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
      Processes requests for both HTTP GET and POST methods.
      Parameters:
      request - servlet request
      response - servlet response
      Throws:
      ServletException - if a servlet-specific error occurs
      IOException - if an I/O error occurs
    • doGet

      protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
      Handles the HTTP GET method.
      Overrides:
      doGet in class HttpServlet
      Parameters:
      request - servlet request
      response - servlet response
      Throws:
      ServletException - if a servlet-specific error occurs
      IOException - if an I/O error occurs
    • doPost

      protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
      Handles the HTTP POST method.
      Overrides:
      doPost in class HttpServlet
      Parameters:
      request - servlet request
      response - servlet response
      Throws:
      ServletException - if a servlet-specific error occurs
      IOException - if an I/O error occurs
    • getServletInfo

      public String getServletInfo()
      Returns a short description of the servlet.
      Specified by:
      getServletInfo in interface Servlet
      Overrides:
      getServletInfo in class GenericServlet
      Returns:
      a String containing servlet description