public class RoutingServlet
extends javax.servlet.http.HttpServlet
Internally stores state in a single session variable.
Modifier and Type | Field and Description |
---|---|
static String |
CURRENT_DESTINATION |
Constructor and Description |
---|
RoutingServlet(String defaultTarget) |
Modifier and Type | Method and Description |
---|---|
static void |
clean(javax.servlet.http.HttpServletRequest req)
Cleans any previous routing settings.
|
static void |
forwardTo(String newDestination,
javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
The routing will be reconfigured to forward all requests to the given destination.
|
protected void |
service(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
public static final String CURRENT_DESTINATION
public RoutingServlet(String defaultTarget)
protected void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
service
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
IOException
public static void forwardTo(String newDestination, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws javax.servlet.ServletException, IOException
newDestination
- req
- resp
- javax.servlet.ServletException
IOException
public static void clean(javax.servlet.http.HttpServletRequest req)
req
- Copyright © 2018 Unity. All rights reserved.