Package javax.servlet

Examples of javax.servlet.UnavailableException


                throw new ServletException("No resources", e);
            }
        }

        if (resources == null) {
            throw new UnavailableException("No resources");
        }

    }
View Full Code Here


            }
        } catch (Exception e) {
            // when exception occurs during the servlet initialization
            // it should be marked as unavailable
            logger.error(e.getMessage(), e);
            throw new UnavailableException(e.getMessage());
        }
    }
View Full Code Here

        // Verify that we were not accessed using the invoker servlet
        String servletName = getServletConfig().getServletName();
        if (servletName == null)
            servletName = "";
        if (servletName.startsWith("org.apache.catalina.INVOKER."))
            throw new UnavailableException
                ("Cannot invoke CGIServlet through the invoker");

        // Set our properties from the initialization parameters
        String value = null;
        try {
View Full Code Here

    protected void doGet(HttpServletRequest req, HttpServletResponse res)
        throws ServletException, IOException {

        // Verify that we were not accessed using the invoker servlet
        if (req.getAttribute(Globals.INVOKED_ATTR) != null)
            throw new UnavailableException
                ("Cannot invoke CGIServlet through the invoker");

        CGIEnvironment cgiEnv = new CGIEnvironment(req, getServletContext());

        if (cgiEnv.isValid()) {
View Full Code Here

      load();
      getServletContext().setAttribute(Constants.DATABASE_KEY,
               database);
  } catch (Exception e) {
      log("Database load exception", e);
      throw new UnavailableException
    ("Cannot load database from '" + pathname + "'");
  }

    }
View Full Code Here

                context.log("Unable to convert config location " + configLocn + " to a URI: " + ex.getMessage());
            }
        }

        if (name == null) {
            throw new UnavailableException("A context-name attribute is required");
        }
        if (context.getAttribute(Log4jContextListener.LOG4J_CONTEXT_ATTRIBUTE) == null) {
            LoggerContext ctx;
            final LoggerContextFactory factory = LogManager.getFactory();
            if (factory instanceof Log4jContextFactory) {
View Full Code Here

            ResourceProvider rp = new ServletContextResourceProvider(
                getServletContext());
            sling = new SlingBridge(logger, rp, props);
        } catch (Exception ex) {
            log("Cannot start the OSGi framework", ex);
            throw new UnavailableException("Cannot start the OSGi Framework: "
                + ex);
        }

        // set up the OSGi HttpService proxy servlet
        delegatee = new HttpServiceServlet();
View Full Code Here

            }
        } catch (Exception e) {
            // when exception occurs during the servlet initialization
            // it should be marked as unavailable
            logger.error(e.getMessage(), e);
            throw new UnavailableException(e.getMessage());
        }
    }
View Full Code Here

    @Override
    public void init() throws ServletException {

        // Ensure that our ContainerServlet properties have been set
        if ((wrapper == null) || (context == null))
            throw new UnavailableException(
                    sm.getString("managerServlet.noWrapper"));

        // Set our properties from the initialization parameters
        String value = null;
        try {
View Full Code Here

        // Verify that we were not accessed using the invoker servlet
        String servletName = getServletConfig().getServletName();
        if (servletName == null)
            servletName = "";
        if (servletName.startsWith("org.apache.catalina.INVOKER."))
            throw new UnavailableException
                ("Cannot invoke CGIServlet through the invoker");
       
        // Set our properties from the initialization parameters
        if (getServletConfig().getInitParameter("debug") != null)
            debug = Integer.parseInt(getServletConfig().getInitParameter("debug"));
View Full Code Here

TOP

Related Classes of javax.servlet.UnavailableException

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.