Package org.nanocontainer.nanowar

Examples of org.nanocontainer.nanowar.ServletRequestContainerLauncher


        super();
        ActionFactory.setActionFactory(new WebWorkActionFactory());
    }

    public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException {
        ServletRequestContainerLauncher containerLauncher = new ServletRequestContainerLauncher(getServletContext(), request);
        try {
            containerLauncher.startContainer();
            // process the servlet using webwork
            super.service(request, response);
        } catch (Exception e) {
            throw new ServletException(e);
        } finally {
            try {
                containerLauncher.killContainer();
            } catch (Exception e) {
                throw new ServletException(e);
            }
        }
    }
View Full Code Here


            dispatcher = new ChainingDispatcher(".vm");
        }
    }

    protected void service(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws ServletException, IOException {
        ServletRequestContainerLauncher containerLauncher = new ServletRequestContainerLauncher(getServletContext(), httpServletRequest);
        try {
            containerLauncher.startContainer();
            String servletPath = getServletPath(httpServletRequest);
            String scriptPathWithoutExtension = servletPath.substring(0, servletPath.lastIndexOf('/'));

            Object action = getActionObject(scriptPathWithoutExtension, httpServletRequest);
            setPropertiesWithOgnl(httpServletRequest, action);

            int dot = servletPath.lastIndexOf('.');
            String actionMethod = servletPath.substring(servletPath.lastIndexOf('/') + 1, dot);
            String result = execute(action, actionMethod);

            httpServletRequest.setAttribute("action", action);
            ServletContext servletContext = getServletContext();
            dispatcher.dispatch(servletContext, httpServletRequest, httpServletResponse, scriptPathWithoutExtension, actionMethod, result);
        } catch (ScriptException e) {
            handleServiceScriptException(e, httpServletResponse, httpServletRequest);
        } finally {
            containerLauncher.killContainer();
        }
    }
View Full Code Here

        super();
        ActionProxyFactory.setFactory(new PicoActionProxyFactory());
    }

    public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException {
        ServletRequestContainerLauncher containerLauncher = new ServletRequestContainerLauncher(getServletContext(), request);
        try {
            containerLauncher.startContainer();
            // process the servlet using webwork2
            super.service(request, response);
        } finally {
            containerLauncher.killContainer();
        }
    }
View Full Code Here

* @author <a href="mailto:evan@bottch.com">Evan Bottcher</a>
*/
public class NanoAxisServlet extends AxisServlet {

    public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException {
        ServletRequestContainerLauncher containerLauncher = new ServletRequestContainerLauncher(getServletContext(), request);
        try {
            containerLauncher.startContainer();
            super.service(request, response);
        } catch (IOException e) {
            throw new ServletException(e);
        } finally {
            containerLauncher.killContainer();
        }
    }
View Full Code Here

TOP

Related Classes of org.nanocontainer.nanowar.ServletRequestContainerLauncher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.