Package org.apache.catalina

Examples of org.apache.catalina.Context.addWelcomeFile()


    String contextPathURIBase = config.getContextPath();
    Context context =
        tomcat.addContext(contextPathURIBase == null ? "" : contextPathURIBase, contextPath.getAbsolutePath());
    context.addApplicationListener(new ApplicationListener(InitListener.class.getName(), false));
    context.setWebappVersion("3.0");
    context.addWelcomeFile("index.jspx");
    addErrorPages(context);

    ServletContext servletContext = context.getServletContext();
    servletContext.setAttribute(InitListener.INSTANCE_ID_KEY, config.getInstanceID());
    servletContext.setAttribute(InitListener.BUCKET_KEY, config.getBucket());
View Full Code Here


    context.addChild(jspServlet);
    context.addServletMapping("*.jsp", "jsp");
    context.addServletMapping("*.jspx", "jsp");

    // Set seme default welcome files
    context.addWelcomeFile("index.html");
    context.addWelcomeFile("index.htm");
    context.addWelcomeFile("index.jsp");
    context.setSessionTimeout(30);

    // Add some mime mappings
View Full Code Here

    context.addServletMapping("*.jsp", "jsp");
    context.addServletMapping("*.jspx", "jsp");

    // Set seme default welcome files
    context.addWelcomeFile("index.html");
    context.addWelcomeFile("index.htm");
    context.addWelcomeFile("index.jsp");
    context.setSessionTimeout(30);

    // Add some mime mappings
    context.addMimeMapping("html", "text/html");
View Full Code Here

    context.addServletMapping("*.jspx", "jsp");

    // Set seme default welcome files
    context.addWelcomeFile("index.html");
    context.addWelcomeFile("index.htm");
    context.addWelcomeFile("index.jsp");
    context.setSessionTimeout(30);

    // Add some mime mappings
    context.addMimeMapping("html", "text/html");
    context.addMimeMapping("htm", "text/html");
View Full Code Here

    context.addLifecycleListener(new DefaultWebXmlListener());
    context.setSessionTimeout(30);
    for (int i = 0; i < DEFAULT_MIME_MAPPINGS.length;) {
      context.addMimeMapping(DEFAULT_MIME_MAPPINGS[i++], DEFAULT_MIME_MAPPINGS[i++]);
    }
    context.addWelcomeFile("index.jsp");

    File configFile = new File("src/main/webapp/META-INF/context.xml");
    context.setConfigFile(configFile.toURI().toURL());

    ContextConfig ctxCfg = new ContextConfig();
View Full Code Here

    context.addLifecycleListener(new DefaultWebXmlListener());
    context.setSessionTimeout(30);
    for (int i = 0; i < DEFAULT_MIME_MAPPINGS.length;) {
      context.addMimeMapping(DEFAULT_MIME_MAPPINGS[i++], DEFAULT_MIME_MAPPINGS[i++]);
    }
    context.addWelcomeFile("index.jsp");

    File configFile = new File("src/main/webapp/META-INF/context.xml");
    context.setConfigFile(configFile.toURI().toURL());

    ContextConfig ctxCfg = new ContextConfig();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.