一个工程在tomcat下能正常运行,但在web.xml加了struts2的配置文件(拦截器)后,运行工程,则提示找不到该工程,404.是怎么回事?谢谢
配置代码如下
<?xml version="1.0" encoding="GBK"?><web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <!-- 定义Struts2的核心Filter -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<!-- 让Struts2的核心Filter拦截所有请求 -->
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> <display-name>book</display-name>
<welcome-file-list>
<welcome-file>index1.jsp</welcome-file>
</welcome-file-list>
</web-app>
配置代码如下
<?xml version="1.0" encoding="GBK"?><web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> <!-- 定义Struts2的核心Filter -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<!-- 让Struts2的核心Filter拦截所有请求 -->
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping> <display-name>book</display-name>
<welcome-file-list>
<welcome-file>index1.jsp</welcome-file>
</welcome-file-list>
</web-app>
解决方案 »
- Struts2 类型转换问题,在线等
- james 服务器配置
- 一个异常,请高手指点迷经
- 如何实现 上载的库存可直接从EXCEL文件复制过来,列的顺序必需跟下面的一致.如果某列无内容,该列也必需保留.?
- jsp怎么打包成安装程序,双击安装配置好运行环境(sql、tomcat等)
- help:hibernate如何配置非主键关联?
- R语言封装jar包
- struts标签错误提示,急(100)
- 初级菜鸟关于tomcat的安装与配置的问题!
- 各位大虾,什么是WebService?我只懂jsp,servlet和简单的ejb,怎么用webservice做一个简单的例子
- 如何让JFileChooser的对话框保持在最前,是点击jsp页面的按钮弹出来的
- 怎么讲json字符串转换为java对象集合
book 工程?
还有就是启动的时候报的什么错误?