struts2.1.0和struts2.1.1的web.xml配置文件怎么写
解决方案 »
- checkstyle报protected错误
- apache mina框架
- 高级sql语句查询 求解
- java Selector 序列话问题(困扰很久)
- 用hibernate实现数据的持久化,怎么才能实现将两个类中的数据处理操作放到同一个事务中?
- tomcat与websphere
- 开发webservice环境搭配的问题。
- J2EE 初学者,不知从何学习,一头雾水,所以送 40 分请指点捷径.谢谢恩人.
- 《JakartaStrutsLive》中第一个例子。。打包成功。。运行错误 请帮忙解决! 100分奉送!
- XML分析的问题 如何读取参数
- java技术交流群87540701
- Android程序获手机取联系人的邮箱和联系地址?
<filter-name>struts2 </filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
<init-param>
<param-name>config </param-name>
<param-value>struts-default.xml,struts-plugin.xml,/WEB-INF/struts.xml </param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>struts2 </filter-name>
<url-pattern>/* </url-pattern>
</filter-mapping>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter><filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
具体看
http://struts.apache.org/2.1.8.1/docs/create-struts-2-web-application-with-artifacts-in-web-inf-lib-and-use-ant-to-build-the-application.html
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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"> <!--配置Struts2-->
<filter>
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
</filter-class>
</filter> <filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>