Posted By:
Christopher_Pickslay
Posted On:
Saturday, August 11, 2001 03:10 PM
Generally, your web server is configured to listen for all requests, and forward certain requests to your application server, based either on the path requested, the file extension, or both. How you configure this depends on which web and application servers you're using. For apache/tomcat configuration, see
http://jakarta.apache.org/tomcat/tomcat-3.2-doc/tomcat-apache-howto.html
Once you're configured correctly, all URLs (in JSPs, servlets, or static HTML pages) should point to paths relative to either your web server's document root (for static content) or your web application's context root (for JSPs). A common configuration is to have the web server handle all requests except those within a web application context root.
In your Tomcat configuration, you define a web application context with a tag that looks something like this:
The path attribute specifies the URI paths that should be directed to this web application. The docBase attribute specifies the location on disk of your web application. For example, a JSP on disk at:
/tomcat/webapps/mwa/test.jsp
would be served by the following URL:
http://your-host/myWebApp/test.jsp