com.xpn.xwiki
Class XWikiRootServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.xpn.xwiki.XWikiRootServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class XWikiRootServlet
extends javax.servlet.http.HttpServlet

The root servlet for XWiki. The purpose of this servlet is to respond to WebDAV requests correctly and to redirect get requests on server root appropriately.

Version:
$Id: 520be6492701515dc42449bf7adc7f324ae91171 $
See Also:
Serialized Form

Constructor Summary
XWikiRootServlet()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          
protected  void doOptions(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          
 void init()
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, 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
 

Constructor Detail

XWikiRootServlet

public XWikiRootServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

doOptions

protected void doOptions(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws javax.servlet.ServletException,
                         IOException

Responds to an OPTIONS requests on / with appropriate headers.

Overrides:
doOptions in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException

doGet

protected void doGet(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws javax.servlet.ServletException,
                     IOException

Redirects GET requests on / (the server root) to the XWiki application context. That is usually /xwiki/, but can be configured from web.xml using the redirectTo initialization parameter for this servlet.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException


Copyright © 2004-2013 XWiki. All Rights Reserved.