com.google.gwt.requestfactory.server
Class RequestFactoryServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.google.gwt.requestfactory.server.RequestFactoryServlet
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class RequestFactoryServlet
- extends javax.servlet.http.HttpServlet
Handles GWT RequestFactory JSON requests. Does user authentication on every
request, returning SC_UNAUTHORIZED if authentication fails, as well as a
header named "login" which contains the URL the user should be sent in to
login. Note that the servlet expects a "pageurl" header in the request,
indicating the page to redirect to after authentication. If authentication
succeeds, a header named "userId" is returned, which will be unique to the
user (so the app can react if the signed in user has changed).
Configured via servlet init params.
e.g. - in order to use GAE authentication:
<init-param>
<param-name>userInfoClass</param-name>
<param-value>com.google.gwt.sample.expenses.server.domain.GaeUserInformation</param-value>
</init-param>
- See Also:
- Serialized Form
|
Method Summary |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
static javax.servlet.http.HttpServletRequest |
getThreadLocalRequest()
|
static javax.servlet.http.HttpServletResponse |
getThreadLocalResponse()
|
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RequestFactoryServlet
public RequestFactoryServlet()
RequestFactoryServlet
public RequestFactoryServlet(ExceptionHandler exceptionHandler)
- Use this constructor in subclasses to provide a custom
ExceptionHandler.
getThreadLocalRequest
public static javax.servlet.http.HttpServletRequest getThreadLocalRequest()
getThreadLocalResponse
public static javax.servlet.http.HttpServletResponse getThreadLocalResponse()
doPost
protected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException,
javax.servlet.ServletException
- Overrides:
doPost in class javax.servlet.http.HttpServlet
- Throws:
java.io.IOException
javax.servlet.ServletException