2.10 Deployment Directories for Default Web Application: Summary

2.10 Deployment Directories for Default Web Application: Summary

The following subsections summarize the way to deploy and access HTML files, JSP pages, servlets, and utility classes in Apache Tomcat, Macromedia JRun, and Caucho Resin. The summary assumes that you are deploying files in the default Web application, have changed the port number to 80 (see Section 2.3), and are accessing servlets through the default URL (i.e., http://host/servlet/ServletName ). Section 2.11 explains how to deploy user -defined Web applications and how to customize the URLs. But you'll probably want to start with the defaults just to confirm that everything is working properly. The Appendix (Server Organization and Structure) gives a unified summary of the directories used by Tomcat, JRun, and Resin for both the default Web application and custom Web applications.

If you are using a server on your desktop, you can use localhost for the host portion of each of the URLs in this section.

Tomcat

HTML and JSP Pages
  • Main Location.

     
      install_dir  /webapps/ROOT 
  • Corresponding URLs.

    http:// host/SomeFile. html

    http:// host/SomeFile. jsp

  • More Specific Location (Arbitrary Subdirectory).

     
      install_dir  /webapps/ROOT/  SomeDirectory  
  • Corresponding URLs.

    http:// host/SomeDirectory/SomeFile. html

    http:// host/SomeDirectory/SomeFile. jsp

Individual Servlet and Utility Class Files
  • Main Location (Classes without Packages).

     
      install_dir  /webapps/ROOT/WEB-INF/classes 
  • Corresponding URL (Servlets).

    http:// host servlet/ ServletName

  • More Specific Location (Classes in Packages).

     
      install_dir  /webapps/ROOT/WEB-INF/classes/  packageName  
  • Corresponding URL (Servlets in Packages).

    http:// host /servlet/ packageName.ServletName

Servlet and Utility Class Files Bundled in JAR Files
  • Location.

     
      install_dir  /webapps/ROOT/WEB-INF/lib 
  • Corresponding URLs (Servlets).

    http:// host /servlet/ ServletName

    http:// host /servlet/ packageName.ServletName

JRun

HTML and JSP Pages
  • Main Location.

     
      install_dir  /servers/default/default-ear/default-war 
  • Corresponding URLs.

    http:// host/SomeFile. html

    http:// host/SomeFile. jsp

  • More Specific Location (Arbitrary Subdirectory).

     
      install_dir  /servers/default/default-ear/default-war/  SomeDirectory  
  • Corresponding URLs.

    http:// host/SomeDirectory/SomeFile. html

    http:// host/SomeDirectory/SomeFile. jsp

Individual Servlet and Utility Class Files
  • Main Location (Classes without Packages).

     
      install_dir  /servers/default/default-ear/default-war/WEB-INF/classes 
  • Corresponding URL (Servlets).

    http:// host /servlet/ ServletName

  • More Specific Location (Classes in Packages).

     
      install_dir  /servers/default/default-ear/default-war/WEB-INF/classes/  packageName  
  • Corresponding URL (Servlets in Packages).

    http:// host /servlet/ packageName.ServletName

Servlet and Utility Class Files Bundled in JAR Files
  • Location.

     
      install_dir  /servers/default/default-ear/default-war/WEB-INF/lib 
  • Corresponding URLs (Servlets).

    http:// host /servlet/ ServletName

    http:// host /servlet/ packageName.ServletName

Resin

HTML and JSP Pages
  • Main Location.

     
      install_dir  /doc 
  • Corresponding URLs.

    http:// host/SomeFile. html

    http:// host/SomeFile. jsp

  • More Specific Location (Arbitrary Subdirectory).

     
      install_dir  /doc/  SomeDirectory  
  • Corresponding URLs.

    http:// host/SomeDirectory/SomeFile. html

    http:// host/SomeDirectory/SomeFile. jsp

Individual Servlet and Utility Class Files
  • Main Location (Classes without Packages).

     
      install_dir  /doc/WEB-INF/classes 
  • Corresponding URL (Servlets).

    http:// host /servlet/ ServletName

  • More Specific Location (Classes in Packages).

     
      install_dir  /doc/WEB-INF/classes/  packageName  
  • Corresponding URL (Servlets in Packages).

    http:// host /servlet/ packageName.ServletName

Servlet and Utility Class Files Bundled in JAR Files
  • Location.

     
      install_dir  /doc/WEB-INF/lib 
  • Corresponding URLs (Servlets).

    http:// host /servlet/ ServletName

    http:// host /servlet/ packageName.ServletName



Core Servlets and JavaServer Pages (Vol. 1.Core Technologies)
Core Servlets and Javaserver Pages: Core Technologies, Vol. 1 (2nd Edition)
ISBN: 0130092290
EAN: 2147483647
Year: 2002
Pages: 194

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net