List of usage examples for org.apache.commons.chain.web.servlet ServletWebContext release
public void release()
Release references to allocated resources acquired in initialize()
of via subsequent processing.
From source file:org.apache.struts.chain.legacy.ComposableRequestProcessor.java
/** * <p>Process an <code>HttpServletRequest</code> and create the * corresponding <code>HttpServletResponse</code>.</p> * * @param request The servlet request we are processing * @param response The servlet response we are creating * * @exception IOException if an input/output error occurs * @exception ServletException if a processing exception occurs *///from w w w.ja va 2 s . co m public void process(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // Wrap the request in the case of a multipart request request = processMultipart(request); // Create and populate a Context for this request ServletWebContext context = new ServletWebContext(); context.initialize(getServletContext(), request, response); context.put(Constants.ACTION_SERVLET_KEY, this.servlet); context.put(Constants.MODULE_CONFIG_KEY, this.moduleConfig); // Create and execute the command. try { if (log.isDebugEnabled()) { log.debug("Using processing chain for this request"); } command.execute(context); } catch (Exception e) { // Execute the exception processing chain?? throw new ServletException(e); } // Release the context. context.release(); }