第一步:Struts2环境的搭建
1.从http://struts.apache.org/2.1.8.1/index.html下载struts2.1.8。如果可能的话尽量下载110mb的那个。虽然大了点但包含了源码、文档和示例。
2.打开Eclipse,建立WEB项目,名称为S2SH。将struts2.1.8解压后的lib目录下的commons-fileupload-1.2.1.jar、commons-io-1.3.2.jar、freemarker-2.3.15.jar、ognl-2.7.3.jar、struts2-core-2.1.8.1.jar、xwork-core-2.1.6.jar这6个jar包拷贝到建立的web项目lib目录下。
3.添加Struts2的过滤器。打开web.xml修改如下。
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<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>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
4.在类路径下建立struts.xml文件,方便起见可以直接拷贝struts2-blank-2.1.8.1下空的struts.xml。
5.添加类User和UserAction,如下。为了我们的action能有更多的功能,可以继承ActionSupport,覆盖其execute方法
User.class如下
package test.s2sh;
public class User {
private String userName;
private String sex;
private Integer age;
private String address;
//set,get略
}
UserAction.class如下
package test.s2sh;
public class UserAction{
private User user;
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public String execute() throws Exception {
user = new User();
user.setAddress("地球");
user.setAge(25);
user.setSex("男");
user.setUserName("中国");
return "success";
}
}
6.把写好的action配置到struts.xml中,配置文件如下
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<package name="default" namespace="/" extends="struts-default">
<action name="user" class="test.s2sh.UserAction">
<result>WEB-INF/jsp/user.jsp</result>
</action>
</package>
</struts>
7.在WEB-INF目录下建立jsp目录,并添加user.jsp文件。jsp内容如下
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>s2sh</title>
</head>
<body>
我的信息如下:<br />
姓名:<s:property value="user.userName"/><br />
性别:<s:property value="user.sex"/><br />
年龄:<s:property value="user.age"/><br />
地址:我来自<s:property value="user.address"/><br />
</body>
</html>
8.在index.jsp文件中添加<jsp:forward page="user"/>,内容如下
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>index</title>
</head>
<body>
<jsp:forward page="user"/>
</body>
</html>
9.好了,把此工程部署到tomcat6上,打开浏览器访问http://localhost:8080/S2SH/
浏览器显示如下信息:
我的信息如下:
姓名:中国
性别:男
年龄: 25
地址:我来自地球
10.现在struts2运行环境搭建完成,特别注意的是<dispatcher>FORWARD</dispatcher>和<dispatcher>REQUEST</dispatcher>不能省略,否则index.jsp将无法访问到UserAction。
第二步:struts2+spring3.0整合
1.下载spring3.0,网址为http://www.springsource.org/download,单击spring Framework 3.0.2.RELEASE下的Download进入下载页面(要填个表单才要下载)。找到下载页面后会有三个下载文件,名字为spring-framework-3.0.2.RELEASE.zip的是要下载的文件。
2.添加jar包,解压缩下载好的文件找到下面jar包,添加到lib目录下
org.springframework.asm-3.0.2.RELEASE.jar
org.springframework.beans-3.0.2.RELEASE.jar
org.springframework.context-3.0.2.RELEASE.jar
org.springframework.core-3.0.2.RELEASE.jar
org.springframework.expression-3.0.2.RELEASE.jar
org.springframework.web-3.0.2.RELEASE.jar
在下载的struts2.1.8下找到下面jar文件,添加进lib目录下
struts2-spring-plugin-2.1.8.1.jar
commons-logging-api-1.1.jar
3.修改web.xml文件添加spring的监听器,配置如下
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<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>
<dispatcher>FORWARD</dispatcher>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
4.在WEB-INF目录下添加applicationContext.xml,把UserAction交给Spring管理。内容如下
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<bean name="userActionBean" class="test.s2sh.UserAction"/>
</beans>
5.修改struts.xml文件,内容如下
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.objectFactory" value="spring"/>
<package name="default" namespace="/" extends="struts-default">
<action name="user" class="userActionBean">
<result>WEB-INF/jsp/user.jsp</result>
</action>
</package>
</struts>
6.至此所有配置都已完成,再次运行项目。如果成功则页面显示和上一步相同,内容如下
我的信息如下:
姓名:中国
性别:男
年龄: 25
地址:我来自地球
7.现在只是简单地实现了将action交由Spring管理。Spring的作用当然不止是这样。
第三步:将Spring3.0和hibernate的整合
1.从官网下载hibernate,网址为http://sourceforge.net/projects/hibernate/files/hibernate3/3.5.1-Final/。
2.添加jar文件,解压缩hibernate3.5文件找到下面jar包,添加进lib目录
antlr-2.7.6.jar
commons-collections-3.1.jar
dom4j-1.6.1.jar
javassist-3.9.0.GA.jar
jta-1.1.jar
slf4j-api-1.5.8.jar
hibernate3.jar
一下两个jar包在Spring3.0的spring-framework-3.0.2.RELEASE-dependencies.zip里面包含,不想从官网下的可以从我提供的附件中获得
com.springsource.org.aopalliance-1.0.0.jar 这个可以在struts2.1.8的lib下找到。
com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar
在Spring3.0的dist目录下找到如下jar包,添加进lib目录
org.springframework.jdbc-3.0.2.RELEASE.jar
org.springframework.aop-3.0.2.RELEASE.jar
org.springframework.orm-3.0.2.RELEASE.jar
org.springframework.transaction-3.0.2.RELEASE.jar
从网上下载slf4j的实现包,还好以前有下载不然又要baidu了。。。
slf4j-jdk14-1.5.8.jar
添加数据库驱动文件
我用的是mysql5,并且在tomcat6的lib目录下以前已经添加了mysql-connector-java-5.1.10-bin.jar驱动,所以可以不用再添加驱动到项目的lib目录。
3.修改User类添加id属性以及set、get方法,并添加hibernate的Mapping文件User.hbm.xml,如下
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<hibernate-mapping package="test.s2sh">
<class name="User" table="user">
<id name="id" column="id">
<generator class="native" />
</id>
<property name="userName" />
<property name="sex" length="2"/>
<property name="age" />
<property name="address"/>
</class>
</hibernate-mapping>
增加UserDao以及实现类UserDaoImpl ,内容如下
package test.s2sh;
public interface UserDao {
public void addUser(User user);
}
package test.s2sh;
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;
public class UserDaoImpl extends HibernateDaoSupport implements UserDao{
public void addUser(User user) {
this.getHibernateTemplate().save(user);
}
}
4.修改action,因为内容太简单了,所以就直接调用DAO了。内容如下
package test.s2sh;
public class UserAction{
private User user;
private UserDao userDao;
//增加一个set方法,让spring注入
public void setUserDao(UserDao userDao) {
this.userDao = userDao;
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public String execute() throws Exception {
user = new User();
user.setAddress("地球");
user.setAge(25);
user.setSex("男");
user.setUserName("中国");
userDao.addUser(user);
return "success";
}
}
5修改applicationContext.xml,添加对hibernate的支持,如下。
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<!-- 配置数据库连接 -->
<bean name="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<!-- jdbc4.0 已经不需要指定驱动的类名了,当然这需要所添加的驱动符合jdbc4.0标准
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
-->
<property name="url" value="jdbc:mysql://localhost:3306/test"/>
<property name="username" value="root"/>
<property name="password" value="123456"/>
</bean>
<!-- 集成hibernate的配置文件 -->
<bean name="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="mappingResources">
<list>
<value>test/s2sh/User.hbm.xml</value>
</list>
</property>
<property name="hibernateProperties">
<value>
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
hibernate.show_sql=true
hibernate.hbm2ddl.auto=create-drop
</value>
</property>
</bean>
<!-- 配置事务管理器 -->
<bean name="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="add*" propagation="REQUIRED"/>
</tx:attributes>
</tx:advice>
<aop:config>
<!-- 因为逻辑太简单了,所以就把事务配置在了Dao层。实际使用中是不会在dao层配置事务的。 -->
<aop:advisor advice-ref="txAdvice" pointcut="execution(* test.s2sh.UserDao.*(..))"/>
</aop:config>
<!-- 这里使用了set方法进行注入-->
<bean name="userDao" class="test.s2sh.UserDaoImpl">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<bean name="userActionBean" class="test.s2sh.UserAction">
<property name="userDao" ref="userDao"/>
</bean>
</beans>
6.然后把工程布置到tomcat下,访问http://localhost:8080/S2SH/ ,显示输入如下
我的信息如下:
姓名:中国
性别:男
年龄:25
地址:我来自地球
已成功保存信息至数据库,返回id为:1
至此,S2SH的整合全部完成,当然这只是HelloWorld级别的练习。仔细数下发现一共用到了28个jar文件,汗。。。
最后附上slf4j-jdk14-1.5.8.jar,com.springsource.org.aopalliance-1.0.0.jar,com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar
- slf4j-jdk14-1.5.8.jar (8.6 KB)
- 下载次数: 218
- com.springsource.org.aopalliance-1.0.0.jar (4.5 KB)
- 下载次数: 223
- com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar (1.6 MB)
- 下载次数: 330
分享到:
java的匿名类
- 2010-04-28 11:38
- 浏览 8711
- 评论(8)
- 分类:编程语言
- 相关推荐
评论
8 楼 wangqingbo1225 2012-01-16 多谢,已经成功哦 7 楼 dimm456852 2010-09-27 能在深夜找到这个帖子实在是太幸运了,我今天为 包 问题困扰了一个下午,最终在楼主的帮助下解决了,深表感谢 6 楼 Maci_Hotesion 2010-07-06 感谢楼主分享,特别好,我用的是Oracle,按照你的步骤做了。都已经成功了。 5 楼 酷的飞上天空 2010-05-23 zylzylzyl 写道 感谢新手非常实用
但有地方写错了
5.修改web.xml文件,内容如下
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
应该是 5.修改action.xml文件,内容如下
呵呵 还真没注意,开始发了几次都没成功结果格式搞乱了。
最后索性去除了所有格式,重新整理下。
多谢你的提醒,更正。 4 楼 zylzylzyl 2010-05-22 感谢新手非常实用
但有地方写错了
5.修改web.xml文件,内容如下
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.objectFactory" value="spring"/>
<package name="default" namespace="/" extends="struts-default">
<action name="user" class="userActionBean">
<result>WEB-INF/jsp/user.jsp</result>
</action>
</package>
</struts>
应该是 5.修改action.xml文件,内容如下 3 楼 酷的飞上天空 2010-05-21 ngman ringman 写道 樓主您好:
我如您的操作步驟第一步我成功了
但在第二步:struts2+spring3.0整合時發生了以下錯誤,但我讓檢查的都檢查了
請問還有那些要注意的?
Struts Problem Report
Struts has detected an unhandled exception:
这个根据提示是没找到你的userActionBean类
可能是配置有点错误,最好把配置文件贴出来看看。
不好意思,心血来潮随便写的,没想到还有人关注。所以就。。。 2 楼 7454103 2010-05-14 估计:'userActionBean 这个在struts2 配置错了
具体的话得看你的配置 1 楼 ringman 2010-05-13 樓主您好:
我如您的操作步驟第一步我成功了
但在第二步:struts2+spring3.0整合時發生了以下錯誤,但我讓檢查的都檢查了
請問還有那些要注意的?
Struts Problem Report
Struts has detected an unhandled exception:
Messages: userActionBean
Unable to instantiate Action, userActionBean, defined for 'user' in namespace '/'userActionBean
File: org/apache/catalina/loader/WebappClassLoader.java
Line number: 1,516
--------------------------------------------------------------------------------
Stacktraces
Unable to instantiate Action, userActionBean, defined for 'user' in namespace '/'userActionBean
com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:307)
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:388)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:187)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:478)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:706)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:677)
org.apache.jsp.TestStuts2_005fSpring3.index_jsp._jspService(index_jsp.java:63)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Unknown Source)
java.lang.ClassNotFoundException: userActionBean
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:146)
com.opensymphony.xwork2.ObjectFactory.getClassInstance(ObjectFactory.java:96)
com.opensymphony.xwork2.spring.SpringObjectFactory.getClassInstance(SpringObjectFactory.java:212)
com.opensymphony.xwork2.spring.SpringObjectFactory.buildBean(SpringObjectFactory.java:132)
com.opensymphony.xwork2.ObjectFactory.buildBean(ObjectFactory.java:139)
com.opensymphony.xwork2.ObjectFactory.buildAction(ObjectFactory.java:109)
com.opensymphony.xwork2.DefaultActionInvocation.createAction(DefaultActionInvocation.java:288)
com.opensymphony.xwork2.DefaultActionInvocation.init(DefaultActionInvocation.java:388)
com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:187)
org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:61)
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy(StrutsActionProxyFactory.java:39)
com.opensymphony.xwork2.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:47)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:478)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:706)
org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:677)
org.apache.jsp.TestStuts2_005fSpring3.index_jsp._jspService(index_jsp.java:63)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Unknown Source)