web程序无法访问:The requested resource () is not available.错误
2008-12-25 22:37
537 查看
昨天按照书本写的第一个web程序就不能看到结果,显示结果如下:
message
description The requested resource () is not available.
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
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">
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
HTTP Status 404 -
type Status reportmessage
description The requested resource () is not available.
Apache Tomcat/5.5.27
经过删除多余文件发现,是web.xml文件错误,其中struts2过滤器的class路径写错了。导致访问不了该class文件。从而有The requested resource () is not available.的提示。
如下的xml是正确的,原来出错的是下面红色字体部分:<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
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">
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
相关文章推荐
- 【转】tomcat 访问软连接文件夹下的网页出现404错误,description The requested resource (/xxx.html) is not available.
- XML配置出错导致HTTP404问题:The requested resource (/WebMailSys/Inbox) is not available.
- servlet web.xml配置好以后还会出现 the requested resource is not available错误的可能原因
- 错误:“The requested resource () is not available.”的处置
- The requested resource () is not available.
- 运行JSP时出现The requested resource (/proj3/MyJsp.jsp) is not available.出现这种情况的原因有多种,这是其中一种(亲测有用)
- Web前段开发中The requested resource is not available的解决办法
- ssh中The requested resource () is not available.
- Servlet路径正确 运行却显示:The requested resource (/webframe/test/TestServlet) is not available
- HTTP Status 404 ,The requested resource (/struts2_test/login) is not available.
- eclipse新建web项目运行时出现The requested resource is not available异常
- 在IE浏览器输入测试servlet程序报:HTTP Status 404(The requested resource is not available)错
- 运行eclipse提示 The requested resource () is not available.
- javaee中.jsp的文件存放错误出现jsp the requested resource is not available.
- HTTP Status 404 /arcgis/rest: The requested resource (/arcgis/rest/) is not available
- description The requested resource (Servlet action is not available) is not available.
- java异常处理:The requested resource () is not available
- j2ee The requested resource () is not available.
- 如何解决The requested resource () is not available的问题
- The requested resource is not available错误