|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object HttpServlet org.springframework.web.servlet.ViewRendererServlet
public class ViewRendererServlet
ViewRendererServlet is a bridge servlet, mainly for the Portlet MVC support.
For usage with Portlets, this Servlet is necessary to force the portlet container to convert the PortletRequest to a ServletRequest, which it has to do when including a resource via the PortletRequestDispatcher. This allows for reuse of the entire Servlet-based View support even in a Portlet environment.
The actual mapping of the bridge servlet is configurable in the DispatcherPortlet, via a "viewRendererUrl" property. The default is "/WEB-INF/servlet/view", which is just available for internal resource dispatching.
Field Summary | |
---|---|
static java.lang.String |
MODEL_ATTRIBUTE
Name of request attribute that holds the model Map |
static java.lang.String |
VIEW_ATTRIBUTE
Name of request attribute that holds the View object |
static java.lang.String |
WEB_APPLICATION_CONTEXT_ATTRIBUTE
Request attribute to hold current web application context. |
Constructor Summary | |
---|---|
ViewRendererServlet()
|
Method Summary | |
---|---|
protected void |
doGet(HttpServletRequest request,
HttpServletResponse response)
|
protected void |
doPost(HttpServletRequest request,
HttpServletResponse response)
|
protected void |
processRequest(HttpServletRequest request,
HttpServletResponse response)
Process this request, handling exceptions. |
protected void |
renderView(HttpServletRequest request,
HttpServletResponse response)
Retrieve the View instance and model Map to render and trigger actual rendering. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String WEB_APPLICATION_CONTEXT_ATTRIBUTE
RequestContextUtils.getWebApplicationContext(ServletRequest)
public static final java.lang.String VIEW_ATTRIBUTE
public static final java.lang.String MODEL_ATTRIBUTE
Constructor Detail |
---|
public ViewRendererServlet()
Method Detail |
---|
protected final void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
ServletException
java.io.IOException
protected final void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
ServletException
java.io.IOException
protected final void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException
renderView()
template method.
ServletException
java.io.IOException
renderView(HttpServletRequest, HttpServletResponse)
protected void renderView(HttpServletRequest request, HttpServletResponse response) throws java.lang.Exception
request
- current HTTP requestresponse
- current HTTP response
java.lang.Exception
- in case of any kind of processing failureView.render(java.util.Map, HttpServletRequest, HttpServletResponse)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |