org.apache.catalina.startup.Constants Java Examples

The following examples show how to use org.apache.catalina.startup.Constants. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TomcatServer.java    From DataHubSystem with GNU Affero General Public License v3.0 6 votes vote down vote up
private URL getWebappConfigFileFromDirectory (File docBase, String url)
{
   URL result = null;
   File webAppContextXml =
      new File (docBase, Constants.ApplicationContextXml);
   if (webAppContextXml.exists ())
   {
      try
      {
         result = webAppContextXml.toURI ().toURL ();
      }
      catch (MalformedURLException e)
      {
         LOGGER.warn("Unable to determine web application context.xml " + docBase, e);
      }
   }
   return result;
}
 
Example #2
Source File: TomcatWebAppBuilder.java    From tomee with Apache License 2.0 6 votes vote down vote up
@Override
public void configureStart(final LifecycleEvent event, final StandardContext standardContext) {
    final ContextTransaction contextTransaction = new ContextTransaction();
    contextTransaction.setProperty(org.apache.naming.factory.Constants.FACTORY, UserTransactionFactory.class.getName());
    standardContext.getNamingResources().setTransaction(contextTransaction);

    if (event != null) {
        // ensure NamingContext is available for eager usage (@Observes @Initialized(ApplicationScoped) for instance)
        standardContext.getNamingContextListener().lifecycleEvent(event);
    }

    TomcatHelper.configureJarScanner(standardContext);

    startInternal(standardContext);

    // clear a bit log for default case
    addMyFacesDefaultParameters(standardContext.getLoader().getClassLoader(), standardContext.getServletContext());

    // breaks cdi
    standardContext.setTldValidation(Boolean.parseBoolean(SystemInstance.get().getProperty("tomee.tld.validation", "false")));
    // breaks jstl
    standardContext.setXmlValidation(Boolean.parseBoolean(SystemInstance.get().getProperty("tomee.xml.validation", "false")));
}
 
Example #3
Source File: TestStandardContextResources.java    From Tomcat8-Source-Read with MIT License 4 votes vote down vote up
public AbsoluteOrderContextConfig() {
    super();
    // Prevent it from looking (if it finds one - it'll have dup error)
    setDefaultWebXml(Constants.NoDefaultWebXml);
}
 
Example #4
Source File: TomcatUtil.java    From armeria with Apache License 2.0 4 votes vote down vote up
static String noDefaultWebXmlPath() {
    return Constants.NoDefaultWebXml;
}