日期:2014-05-17  浏览次数:20690 次

各位帮忙看看我这个web.xml配置文件错在哪儿了
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
  version="2.4">
  <display-name>Welcome to Tomcat</display-name>
  <description>
  Welcome to Tomcat
  </description>
<!-- JSPC servlet mappings start -->
<!-- JSPC servlet mappings end -->
<!--重写 -->
<!-- SESSION TIME OUT -->
<session-config> 
<session-timeout>-1</session-timeout> 
</session-config>
  <resource-ref> 
  <description>DB Connection</description> 
  <res-ref-name>jdbc/rot</res-ref-name> 
  <res-type>javax.sql.DataSource</res-type> 
  <res-auth>Container</res-auth> 
  </resource-ref>
</web-app>
加载这个配置文件之后,所有的网站文件打开的时候都显示404错误
type Status report

message /a.html

description The requested resource (/a.html) is not available.


a.html是其中的一个网站文件,其它的文件也是显示*.*is not available.
不加载web.xml的时候能正常运行。

------解决方案--------------------
是因为用了这个web.xml后,你的应用出错所以根本没成功载入Tomcat吧。。。

看看启动是否有任何错误信息或警告信息。