I am using WebSphere. Where exactly should I place my HTML files and servlet class files and how do I access these files from the browser?

Taylor Goetz

Websphere (at least version 1.x-2.x) works as a plug-in for a webserver such as Apache or IIS. You will have an installation directory for both WebSphere and the HTTP server. The location and names of these directories depends on the server platform.

Your HTML and JSP pages will be placed in the root folder of the web server (or virtual server), or one of its subdirectories:

<apache install path>/htdocs

<some path>wwwroot

(If you are using virtual servers under IIS, you should realize that each virtual server must be configured to use WebSphere individually)

Your compiled servlet classes typically go in the "servlets" subdirectory of the WebSphere installation directory. It is important to point out that this directory is "reloadable", meaning any classes in this directory may be dynamically reloaded if they are modified.

The alternative is to place your classes in the "classes" subdirectory, or within the system classpath. In this case, your classes are not subject to dynamic reloading, and the servlet engine must be restarted for any changes to take effect.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact