catch (Exception e) throw new UnavailableException(e.toString());
/** * Check to ensure class of servlet is acceptable. * @throws UnavailableException */ public void checkServletType () throws UnavailableException { if (_class==null || !javax.servlet.Servlet.class.isAssignableFrom(_class)) { throw new UnavailableException("Servlet "+_class+" is not a javax.servlet.Servlet"); } }
/** * Check to ensure class of servlet is acceptable. * @throws UnavailableException */ public void checkServletType () throws UnavailableException { if (_class==null || !javax.servlet.Servlet.class.isAssignableFrom(_class)) { throw new UnavailableException("Servlet "+_class+" is not a javax.servlet.Servlet"); } }
/** * Check to ensure class of servlet is acceptable. * @throws UnavailableException */ public void checkServletType () throws UnavailableException { if (_class==null || !javax.servlet.Servlet.class.isAssignableFrom(_class)) { throw new UnavailableException("Servlet "+_class+" is not a javax.servlet.Servlet"); } }
/** * Check to ensure class of servlet is acceptable. * @throws UnavailableException */ public void checkServletType () throws UnavailableException { if (_class==null || !javax.servlet.Servlet.class.isAssignableFrom(_class)) { throw new UnavailableException("Servlet "+_class+" is not a javax.servlet.Servlet"); } }
/** * Check to ensure class of servlet is acceptable. * @throws UnavailableException */ public void checkServletType () throws UnavailableException { if (_class==null || !javax.servlet.Servlet.class.isAssignableFrom(_class)) { throw new UnavailableException("Servlet "+_class+" is not a javax.servlet.Servlet"); } }
/** * Check to ensure class of servlet is acceptable. * @throws UnavailableException */ public void checkServletType () throws UnavailableException { if (!javax.servlet.Servlet.class.isAssignableFrom(_class)) { throw new UnavailableException("Servlet "+_class+" is not a javax.servlet.Servlet"); } }
public void init(ServletConfig config) throws ServletException { super.init(config); contextPath = config.getInitParameter(CONTEXT_PATH); servletPath = config.getInitParameter(SERVLET_PATH); if (contextPath == null || servletPath == null) { throw new UnavailableException("context-path and servlet-path " + "must be provided as configuration parameters"); } }
private void validateConfig(ServletConfig config) throws ServletException { @SuppressWarnings("unchecked") List<String> initParameterNames = Collections.list(config.getInitParameterNames()); for (String initParameterName : initParameterNames) { if (FORBIDDEN_CONFIG_PARAMETERS.contains(initParameterName)) { throw new UnavailableException(initParameterName + " not supported in " + getClass().getName()); } } }
/** * <p>Simplifies exception handling in the <code>parseModuleConfigFile</code> method.<p> * @param path * @param e * @throws UnavailableException as a wrapper around Exception */ private void handleConfigException(String path, Exception e) throws UnavailableException { String msg = internal.getMessage("configParse", path); log.error(msg, e); throw new UnavailableException(msg); }
private void checkConfiguratorAvailability() throws UnavailableException { if (Configurator.getInstance() == null) { throw new UnavailableException("configurator is not available"); } }
public void init(ServletConfig config) throws ServletException { 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); _context.log("Transparent ProxyServlet @ "+(_prefix==null?"-":_prefix)+ " to "+_proxyTo); }
private void validateConfig() throws ServletException { for (String initParameterName : Collections.list(getServletConfig().getInitParameterNames())) { if (FORBIDDEN_CONFIG_PARAMETERS.contains(initParameterName)) { throw new UnavailableException(initParameterName + " not supported in " + getClass().getName()); } } }
public void init(ServletConfig config) throws ServletException { 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); _context.log("Transparent ProxyServlet @ "+(_prefix==null?"-":_prefix)+ " to "+_proxyTo); }
private void makeUnavailable(Throwable e) { if (e instanceof UnavailableException) makeUnavailable((UnavailableException)e); else { _servletHandler.getServletContext().log("unavailable",e); _unavailableEx=new UnavailableException(e.toString(),-1); _unavailable=-1; } }
private FacesContextFactory acquireFacesContextFactory() throws UnavailableException { try { return (FacesContextFactory) FactoryFinder.getFactory(FACES_CONTEXT_FACTORY); } catch (FacesException e) { String msg = LOGGER.getResourceBundle().getString("severe.webapp.facesservlet.init_failed"); LOGGER.log(SEVERE, msg, e.getCause() != null ? e.getCause() : e); throw new UnavailableException(msg); } }
private FacesContextFactory acquireFacesContextFactory() throws UnavailableException { try { return (FacesContextFactory) FactoryFinder.getFactory(FACES_CONTEXT_FACTORY); } catch (FacesException e) { String msg = LOGGER.getResourceBundle().getString("severe.webapp.facesservlet.init_failed"); LOGGER.log(SEVERE, msg, e.getCause() != null ? e.getCause() : e); throw new UnavailableException(msg); } }
private FacesContextFactory acquireFacesContextFactory() throws UnavailableException { try { return (FacesContextFactory) FactoryFinder.getFactory(FACES_CONTEXT_FACTORY); } catch (FacesException e) { String msg = LOGGER.getResourceBundle().getString("severe.webapp.facesservlet.init_failed"); LOGGER.log(SEVERE, msg, e.getCause() != null ? e.getCause() : e); throw new UnavailableException(msg); } }
public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (!urlRewriteFilter.isLoaded()) { throw new UnavailableException("not initialised"); } else { FilterChainWrapper filterChainWrapper = new FilterChainWrapper(); urlRewriteFilter.doFilter(request, response, filterChainWrapper); } }
public void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (!urlRewriteFilter.isLoaded()) { throw new UnavailableException("not initialised"); } else { FilterChainWrapper filterChainWrapper = new FilterChainWrapper(); urlRewriteFilter.doFilter(request, response, filterChainWrapper); } }