tomcat\conf目录下的web.xml文件中的
    <!-- The mapping for the invoker servlet -->    <servlet-mapping>
        <servlet-name>invoker</servlet-name>
        <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>
是否正确?servlet要放在:working\web-inf\classes\package\*.class

解决方案 »

  1.   

    我对web.xml不懂,能否讲详细一点???
    谢谢!!!
      

  2.   

    web.xml里面有例子啊,自己看看应该能看懂的
      

  3.   

    servlet文件放在web-inf/class下,然后http://localhost:8080/working/servlet/servletname
      

  4.   

    比如说,我的TOMCAT在C:\TOMCAT下,工作目录在D:\WORKING中,servlet放在D:\WORKING\WEB-INF\classes\下,我应该修改tomcat的web.xml中的那些地方呢?
      

  5.   


    C:\TOMCAT\conf\web.xml文件
    你还要配置一下虚拟路径:
     <Context path="/working" docBase="d:\working" debug="0"
                     reloadable="true">
    访问时:http://localhost:8080/working/servlet/
      

  6.   

    虚拟路径在C:\TOMCAT\conf\server.xml里加
      

  7.   

    虚拟路径我配了的,否则D:\WORKING中的JSP就不可能运行,现在关键是是否要设置web.xml文件,怎么设置?