Package winstone

Examples of winstone.ServletConfiguration


    /**
     * Get an instance of the servlet configuration object
     */
    protected ServletConfiguration getInvokableInstance(String servletName)
            throws ServletException, IOException {
        ServletConfiguration sc = null;
        synchronized (this.mountedInstances) {
            if (this.mountedInstances.containsKey(servletName)) {
                sc = (ServletConfiguration) this.mountedInstances.get(servletName);
            }
        }

        if (sc == null) {
            // If found, mount an instance
            try {
                // Class servletClass = Class.forName(servletName, true,
                // Thread.currentThread().getContextClassLoader());
                sc = new ServletConfiguration((WebAppConfiguration) this.getServletContext(),
                        getServletConfig().getServletName() + ":" + servletName, servletName,
                        new Hashtable(), -1);
                this.mountedInstances.put(servletName, sc);
                Logger.log(Logger.DEBUG, INVOKER_RESOURCES,
                        "InvokerServlet.MountingServlet", new String[] {
                                servletName,
                                getServletConfig().getServletName() });
                // just to trigger the servlet.init()
                sc.ensureInitialization();
            } catch (Throwable err) {
                sc = null;
            }
        }
        return sc;
View Full Code Here


            servletName = req.getPathInfo();
        else
            servletName = "";
        if (servletName.startsWith("/"))
            servletName = servletName.substring(1);
        ServletConfiguration invokedServlet = getInvokableInstance(servletName);

        if (invokedServlet == null) {
            Logger.log(Logger.WARNING, INVOKER_RESOURCES,
                    "InvokerServlet.NoMatchingServletFound", servletName);
            rsp.sendError(HttpServletResponse.SC_NOT_FOUND, INVOKER_RESOURCES
View Full Code Here

TOP

Related Classes of winstone.ServletConfiguration

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.