你应该查看一下tomcat安装手册,建立目录的方法。
需要修改一下Server.xml文件。

解决方案 »

  1.   

    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. 
      

  2.   

    <servlet>
        <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>
      

  3.   

    你看下WEB.XML文件配置说明,这个可能对你有帮助