Package org.wso2.carbon.ui
Class RootRedirectServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.wso2.carbon.ui.RootRedirectServlet
- All Implemented Interfaces:
Serializable,javax.servlet.Servlet,javax.servlet.ServletConfig
public class RootRedirectServlet
extends javax.servlet.http.HttpServlet
A servlet that handles requests to the root path "/" and redirects to the
configured default context (e.g., /carbon/admin/index.jsp).
This servlet is necessary because when using OSGi HTTP Whiteboard,
the ServletContextHelper (CarbonSecuredHttpContext) registered at path "/"
doesn't receive requests for "/" directly unless there's a servlet
registered to handle that path. Without this servlet, requests to "/"
would result in a 404 error being forwarded to the error page.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor when no CarbonUIDefinitions is available.RootRedirectServlet(CarbonUIDefinitions carbonUIDefinitions) Constructor with CarbonUIDefinitions for getting the default context. -
Method Summary
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
-
Constructor Details
-
RootRedirectServlet
Constructor with CarbonUIDefinitions for getting the default context.- Parameters:
carbonUIDefinitions- the UI definitions containing context configuration
-
RootRedirectServlet
public RootRedirectServlet()Default constructor when no CarbonUIDefinitions is available.
-
-
Method Details
-
doGet
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Overrides:
doGetin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException - Overrides:
doPostin classjavax.servlet.http.HttpServlet- Throws:
javax.servlet.ServletExceptionIOException
-