Add a <Context> entry in the Tomcat $TOMCAT_HOME/conf/server.xml configuration file. <Context path="/mytest" docBase="webapps/mytest" crossContext="false" debug="0" reloadable="true" > </Context>path. The context path for your application, which is the prefix of a request URI that tells Tomcat which application should be used to process this request. For example, if you set your path to "/mytest", any request URI beginning with "/mytest" will be processed by this application. This attribute is requrired, and must start with a slash ('/') character. docBase. The document root directory for this web application.
<Context path="/mytest"
docBase="webapps/mytest"
crossContext="false"
debug="0"
reloadable="true" >
</Context>path. The context path for your application, which is the prefix of a request URI that tells Tomcat which application should be used to process this request. For example, if you set your path to "/mytest", any request URI beginning with "/mytest" will be processed by this application. This attribute is requrired, and must start with a slash ('/') character. docBase. The document root directory for this web application.
<servlet-name>login</servlet-name>
<servlet-class>myproject.login</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>login</servlet-name>
<url-pattern>/login</url-pattern>
</servlet-mapping>