/** * Constructs an application spec from an XML document. */ WebApplication( Document document, File file, String contextPath ) throws MalformedURLException, SAXException { if (contextPath != null && contextPath.length() > 0 && !contextPath.startsWith( "/" )) throw new IllegalArgumentException( "Context path " + contextPath + " must start with '/'" ); _contextDir = file; _contextPath = contextPath == null ? "" : contextPath; NodeList nl = document.getElementsByTagName( "display-name" ); if (nl.getLength() > 0) _displayName = XMLUtils.getTextValue( nl.item(0) ).trim(); registerServlets( document ); registerFilters( document ); extractSecurityConstraints( document ); extractContextParameters( document ); extractLoginConfiguration( document ); extractListeners( document ); notifyContextInitialized(); _servletMapping.autoLoadServlets(); }
/** * Constructs an application spec from an XML document. */ WebApplication( Document document, File file, String contextPath ) throws MalformedURLException, SAXException { if (contextPath != null && contextPath.length() > 0 && !contextPath.startsWith( "/" )) throw new IllegalArgumentException( "Context path " + contextPath + " must start with '/'" ); _contextDir = file; _contextPath = contextPath == null ? "" : contextPath; NodeList nl = document.getElementsByTagName( "display-name" ); if (nl.getLength() > 0) _displayName = XMLUtils.getTextValue( nl.item(0) ).trim(); registerServlets( document ); registerFilters( document ); extractSecurityConstraints( document ); extractContextParameters( document ); extractLoginConfiguration( document ); extractListeners( document ); notifyContextInitialized(); _servletMapping.autoLoadServlets(); }
/** * Constructs an application spec from an XML document. */ WebApplication( Document document, File file, String contextPath ) throws MalformedURLException, SAXException { if (contextPath != null && contextPath.length() > 0 && !contextPath.startsWith( "/" )) throw new IllegalArgumentException( "Context path " + contextPath + " must start with '/'" ); _contextDir = file; _contextPath = contextPath == null ? "" : contextPath; NodeList nl = document.getElementsByTagName( "display-name" ); if (nl.getLength() > 0) _displayName = XMLUtils.getTextValue( nl.item(0) ).trim(); registerServlets( document ); registerFilters( document ); extractSecurityConstraints( document ); extractContextParameters( document ); extractLoginConfiguration( document ); extractListeners( document ); notifyContextInitialized(); _servletMapping.autoLoadServlets(); }