我用的是myeclipse 7.5版本。怎样在Web应用中对struts 2.1配置,它说的在web.xml文件中以代码的形式把struts 2.1表示出来啊?web.xml是在Tomcat中的那个吗???我自己弄的老出错!!谢谢各位啦!
解决方案 »
- spring-ldap的日志如何用log4j管理起来
- 求一段获取上传文件大小的js代码
- hibernate中如何解决主键的配置问题?
- 配置了OpenSessionInViewFilter,为什么还出现懒加载问题啊
- hibernate,同时saveOrUpdate两个对象,其中一个失败的话,就回滚
- JbuilderX部署一个web模块到weblogic下发生错误,清高手指点
- struts第三贴,第二贴已结贴
- 求:在WIN2003下安装SQL Server2000和Tomcat经验谈
- 有关rs.updateXXXX() 的一个问题
- 这两个有什么区别啊<%@include file="/public/head.jsp" %> <jsp:include page="/public/head.j
- hibernate 级联问题
- log4j 简单问题
myeclipse7.5不是可以自动部署struts2.1
<filter-name>struts2</filter-name>
<filter-class>
org.apache.struts2.dispatcher.FilterDispatcher
</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
<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"> <!-- 項目名称 -->
<display-name>struts2.1</display-name> <!-- 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> <!-- セッション失効 -->
<session-config>
<session-timeout>30</session-timeout>
</session-config> <!-- ようこそ -->
<welcome-file-list>
<welcome-file>welcome.jsp</welcome-file>
</welcome-file-list></web-app>
配置如下:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
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>*.action</url-pattern>
</filter-mapping>
</web-app>