Class WikiServlet

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    public class WikiServlet
    extends javax.servlet.http.HttpServlet
    This provides a master servlet for dealing with short urls. It mostly does redirects to the proper JSP pages. It also intercepts the servlet shutdown events and uses it to signal wiki shutdown.
    Since:
    2.2
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      WikiServlet()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void destroy()
      Destroys the WikiServlet; called by the servlet container when shutting down the webapp.
      void doGet​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
      void doPost​(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
      void init​(javax.servlet.ServletConfig config)
      • Methods inherited from class javax.servlet.http.HttpServlet

        doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
      • Methods inherited from class javax.servlet.GenericServlet

        getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • init

        public void init​(javax.servlet.ServletConfig config)
                  throws javax.servlet.ServletException
        Specified by:
        init in interface javax.servlet.Servlet
        Overrides:
        init in class javax.servlet.GenericServlet
        Throws:
        javax.servlet.ServletException
      • destroy

        public void destroy()
        Destroys the WikiServlet; called by the servlet container when shutting down the webapp. This method calls the protected method WikiEngine.shutdown(), which sends WikiEngineEvent.SHUTDOWN events to registered listeners.
        Specified by:
        destroy in interface javax.servlet.Servlet
        Overrides:
        destroy in class javax.servlet.GenericServlet
        See Also:
        GenericServlet.destroy()
      • doPost

        public void doPost​(javax.servlet.http.HttpServletRequest req,
                           javax.servlet.http.HttpServletResponse res)
                    throws java.io.IOException,
                           javax.servlet.ServletException
        Overrides:
        doPost in class javax.servlet.http.HttpServlet
        Throws:
        java.io.IOException
        javax.servlet.ServletException
      • doGet

        public void doGet​(javax.servlet.http.HttpServletRequest req,
                          javax.servlet.http.HttpServletResponse res)
                   throws java.io.IOException,
                          javax.servlet.ServletException
        Overrides:
        doGet in class javax.servlet.http.HttpServlet
        Throws:
        java.io.IOException
        javax.servlet.ServletException