PreparatorServletpublic class PreparatorServlet extends HttpServlet implements org.apache.struts2.StrutsStaticsSince 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 |
Methods Summary |
---|
public void | service(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");
|
|