Here Im trying to configure a
servlet in Tomcat.But Im just able to see the directory jap1 but not the WEB_INF directory .this is the procedure Im following .Can anyone help me pls.Im new to
Tomcat 2.3.1. Preparing Directories
Assume that we want to install the application in a directory named C:\jap1\
In C:\jap1\ create a directory named WEB-INF
In WEB-INF create a directory named classes
In classes create a directory named pack1
By now we have the following path: C:\jap1\WEB-INF\classes\pack1\
Copy C1.class into pack1 directory.
2.3.2. Modifying server.xml
Using a text editor, open the file TH\conf\server.xml
Find the </ContextManager> tag. (Note: this is an end tag)
Directly in the line before it, insert the following:
<Context path="/jap1"
docBase="c:/jap1"
crossContext="false"
debug="0"
reloadable="true" >
</Context>
Save and close the file.
This tells the server to map requests that start with /jap1 (after the server name and port number) to the directory c:/jap1
2.3.3. Modifying web.xml
Using a text editor, create the file: C:\jap1\WEB-INF\web.xml
Copy the following text into the file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<servlet>
<servlet-name> localAlias </servlet-name>
<servlet-class> pack1.C1 </servlet-class>
</servlet>
<servlet-mapping>
<servlet-name> localAlias </servlet-name>
<url-pattern> /MyServet </url-pattern>
</servlet-mapping>
</web-app>
Save and close the file.