FileDocCategorySizeDatePackage
PreparatorServlet.javaAPI DocExample2794Mon Jul 23 13:26:38 BST 2007org.apache.struts2.portlet.context

PreparatorServlet

public class PreparatorServlet extends HttpServlet implements org.apache.struts2.StrutsStatics
Since a portlet is not dispatched the same way as a servlet, the {@link org.apache.struts2.ServletActionContext} is not immediately available, as it depends on objects from the servlet API. However, the WW2 view implementations require access to the objects in the {@link org.apache.struts2.ServletActionContext}, and this servlet makes sure that these are available when the portlet actions are executing the render results.

Fields Summary
private static final long
serialVersionUID
private static final Log
LOG
Constructors Summary
Methods Summary
public voidservice(javax.servlet.http.HttpServletRequest servletRequest, javax.servlet.http.HttpServletResponse servletResponse)
Prepares the {@link org.apache.struts2.ServletActionContext} with the {@link ServletContext}, {@link HttpServletRequest} and {@link HttpServletResponse}.


                      
       
               
             
        LOG.debug("Preparing servlet objects for dispatch");
        ServletContext ctx = getServletContext();
        ActionContext.getContext().put(SERVLET_CONTEXT, ctx);
        ActionContext.getContext().put(HTTP_REQUEST, servletRequest);
        ActionContext.getContext().put(HTTP_RESPONSE, servletResponse);
        LOG.debug("Preparation complete");