|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
net.sourceforge.stripes.controller.DispatcherServlet
public class DispatcherServlet
Servlet that controls how requests to the Stripes framework are processed. Uses an instance of the ActionResolver interface to locate the bean and method used to handle the current request and then delegates processing to the bean.
| Constructor Summary | |
|---|---|
DispatcherServlet()
|
|
| Method Summary | |
|---|---|
protected ValidationErrors |
bindValues(ActionBean bean,
ActionBeanContext context,
boolean validate)
Invokes the configured property binder in order to populate the bean's properties from the values contained in the request. |
protected void |
doGet(HttpServletRequest request,
HttpServletResponse response)
Implemented as a simple call to doPost(request, response). |
protected void |
doPost(HttpServletRequest request,
HttpServletResponse response)
Uses the configured actionResolver to locate the appropriate ActionBean type and method to handle the current request. |
protected ActionBean |
getActionBeanInstance(Class<ActionBean> clazz,
HttpServletRequest request)
Gets an instance of the specified ActionBean. |
protected Resolution |
getErrorResolution(HttpServletRequest request)
Determines the page to send the user to (and how) in case of validation errors. |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, 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 |
| Constructor Detail |
|---|
public DispatcherServlet()
| Method Detail |
|---|
protected void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
doGet in class HttpServletServletException
IOException
protected void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException
doPost in class HttpServletrequest - the HttpServletRequest handed to the class by the containerresponse - the HttpServletResponse paired to the request
ServletException - thrown when the system fails to process the request in any way
protected ActionBean getActionBeanInstance(Class<ActionBean> clazz,
HttpServletRequest request)
throws Exception
clazz - the ActionBean class being instantiated/looked up
Exception - if the ActionBean cannot be instantiated
protected ValidationErrors bindValues(ActionBean bean,
ActionBeanContext context,
boolean validate)
throws StripesServletException
bean - the bean to be populatedcontext - the ActionBeanContext containing the request and other information
StripesServletException
protected Resolution getErrorResolution(HttpServletRequest request)
throws StripesServletException
StripesServletException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||