Package javax.servlet

Examples of javax.servlet.UnavailableException


        // Load the MD5 helper used to calculate signatures.
        try {
            md5Helper = MessageDigest.getInstance("MD5");
        } catch (NoSuchAlgorithmException e) {
            throw new UnavailableException("No MD5");
        }

    }
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

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

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

        if (getServletConfig().getInitParameter("showServerInfo") != null) {
            showServerInfo = Boolean.parseBoolean(getServletConfig().getInitParameter("showServerInfo"));
        }
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("hostManagerServlet.noWrapper"));

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

    protected void initRegistry() throws ServletException {

        registry = (Registry) getServletContext().getAttribute
            ("org.apache.catalina.Registry");
        if (registry == null)
            throw new UnavailableException("Registry is not available");

    }
View Full Code Here

    protected void initServer() throws ServletException {

        server = (MBeanServer) getServletContext().getAttribute
            ("org.apache.catalina.MBeanServer");
        if (server == null)
            throw new UnavailableException("MBeanServer is not available");

    }
View Full Code Here

            if (config.getInitParameter("ProxyTo")!=null)
                _proxyTo=config.getInitParameter("ProxyTo");
            if (config.getInitParameter("Prefix")!=null)
                _prefix=config.getInitParameter("Prefix");
            if (_proxyTo==null)
                throw new UnavailableException("No ProxyTo");
            super.init(config);
            config.getServletContext().log("Transparent AsyncProxyServlet @ "+(_prefix==null?"-":_prefix)+ " to "+_proxyTo);
           
        }
View Full Code Here

       
        Bayeux bayeux = (Bayeux)config.getServletContext().getAttribute(Bayeux.ATTRIBUTE);
        if (bayeux==null)
        {
            _config.getServletContext().log("No "+Bayeux.ATTRIBUTE+" initialized");
            throw new UnavailableException(Bayeux.ATTRIBUTE);
        }

        String url=_config.getInitParameter(Oort.OORT_URL);
        if (url==null)
        {
            _config.getServletContext().log("No "+Oort.OORT_URL+" init parameter");
            throw new UnavailableException(Oort.OORT_URL);
        }
       
        Oort oort= new Oort(url,bayeux);
        _config.getServletContext().setAttribute(Oort.OORT_ATTRIBUTE,oort);
View Full Code Here

            }
            catch(Exception e)
            {
                Log.warn("Configuration problem at "+node+": "+e);
                Log.debug(e);
                throw new UnavailableException("Configuration problem");
            }
        }
       
        _servletHandler.setFilters((FilterHolder[])LazyList.toArray(_filters,FilterHolder.class));
        _servletHandler.setFilterMappings((FilterMapping[])LazyList.toArray(_filterMappings,FilterMapping.class));
View Full Code Here

            {
                request.setAttribute(ServletHandler.__J_S_ERROR_EXCEPTION_TYPE,th.getClass());
                request.setAttribute(ServletHandler.__J_S_ERROR_EXCEPTION,th);
                if (th instanceof UnavailableException)
                {
                    UnavailableException ue = (UnavailableException)th;
                    if (ue.isPermanent())
                        response.sendError(HttpServletResponse.SC_NOT_FOUND,th.getMessage());
                    else
                        response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE,th.getMessage());
                }
                else
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.