The following subsections summarize the way to deploy and access HTML files, JSP pages, servlets, and utility classes in Tomcat, JRun, and ServletExec. The summary assumes that you are deploying files in the default Web application, have changed the port number to 80 (see Section 1.3), and are accessing servlets through the default URL (i.e., http://host/servlet/ServletName). Later chapters explain 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 ServletExec 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.
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
Main Location (Classes without Package).
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
Location.
install_dir/webapps/ROOT/WEB-INF/lib
Corresponding URLs (Servlets).
http://host/servlet/ServletName
http://host/servlet/packageName.ServletName
Main Location.
install_dir/servers/default/default-app
Corresponding URLs.
http://host/SomeFile.html
http://host/SomeFile.jsp
More Specific Location (Arbitrary Subdirectory).
install_dir/servers/default/default-app/SomeDirectory
Corresponding URLs.
http://host/SomeDirectory/SomeFile.html
http://host/SomeDirectory/SomeFile.jsp
Main Location (Classes without Package).
install_dir/servers/default/default-app/WEB-INF/classes
Corresponding URL (Servlets).
http://host/servlet/ServletName
More Specific Location (Classes in Packages).
install_dir/servers/default/default-app/WEB-INF/classes/packageName
Corresponding URL (Servlets in Packages).
http://host/servlet/packageName.ServletName
Location.
install_dir/servers/default/default-app/WEB-INF/lib
Corresponding URLs (Servlets).
http://host/servlet/ServletName
http://host/servlet/packageName.ServletName
Main Location.
install_dir/public_html
Corresponding URLs.
http://host/SomeFile.html
http://host/SomeFile.jsp
More Specific Location (Arbitrary Subdirectory).
install_dir/public_html/SomeDirectory
Corresponding URLs.
http://host/SomeDirectory/SomeFile.html
http://host/SomeDirectory/SomeFile.jsp
Main Location (Classes without Package).
install_dir/Servlets
Corresponding URL (Servlets).
http://host/servlet/ServletName
More Specific Location (Classes in Packages).
install_dir/Servlets/packageName
Corresponding URL (Servlets in Packages).
http://host/servlet/packageName.ServletName
Location.
install_dir/Servlets
Corresponding URLs (Servlets).
http://host/servlet/ServletName
http://host/servlet/packageName.ServletName
3.146.176.88