请问web.xml文件是否需要,如果需要,有些什么内容

解决方案 »

  1.   

    E:\setup\Tomcat 4.0\webapps\test
                                    \WEB-INF  <--此目录要存在
                                            \web.xml <--此文件要存在如无配置,web.xml文件可如下:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app></web-app>
      

  2.   

    pay attention to the following.it is nothing about cofig.page contentType="text/html; charset=gb2312"
      

  3.   

    yaray(雅睿) ( ) 
    web.xml文件是否一定要存在.
    但我第一次跑成功后,把web.xml删掉,重启动tomcat,还是可以跑成功.
    但如果是一个新的jsp,则没有web.xml就不能跑.
    请问这是什么原因: xwlovesh(xiewei) 
    找不到页面