`
yj10864
  • 浏览: 83991 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

ssh整合配置(struts2.2.1+ hibernate3.6+spring3.0.5)

    博客分类:
  • web
阅读更多

今天给大家介绍一下最新版本的SSH(struts2.2.1+ hibernate3.6+spring3.0.5)组合。注意本讲解为手工搭建!

一、为SSH做好准备

struts2-2.2.1-all.zip      
hibernate-distribution-3.6.0.Final-dist.zip
spring-framework-3.0.5.RELEASE.zip
spring-framework-2.5.6-with-dependencies.zip
slf4j-1.6.1.zip
apache-tomcat-6.0.29.zip
mysql-connector-java-5.1.13-bin.jar
mysql-essential-5.1.53-win32.msi

工具用eclipse或者myeclipse 文件都行

 

二、搭建开发环境 打开MyEclipse,新建一个web project (选择Java EE5.0)

 

三、需要的jar包

        1、hibernate-3.6.0 配置

             

hibernate-distribution-3.6.0.Final-dist.zip中需要如下jar

hibernate3.jar 
lib/required/antlr-2.7.6.jar 
lib/required/commons-collections-3.1.jar 
lib/required/dom4j-1.6.1.jar 
lib/required/javassist-3.12.0.GA.jar 
lib/required/jta-1.1.jar 
lib/required/slf4j-api-1.6.1.jar 
lib/jpa/hibernate-jpa-2.0-api-1.0.0.Final.jar //新版本需要jar

slf4j-1.6.1.zip中需要如下jar

slf4j-nop-1.6.1.jar

mysql-connector-java-5.1.13-bin.jar //mysql 的驱动包

   注意:新版本已经和Annotation做了组合 要用Annotation不需要另外加入jar。

    在测试的时候也不需要第一种写法:

SessionFactory sf = new AnnotationConfiguration().configure().buildSessionFactory(); //现在已经过时

    用第二种:

SessionFactory  sf = new Configuration().configure().buildSessionFactory();//可以直接使用Annotation

 

  

 

 

   2、spring 3.0.5配置

        

spring-framework-3.0.5.RELEASE.zip中需要如下jar

dist/* //为了方便考入此目录下的所有jar,不想全部考入的自己选择

spring-framework-2.5.6-with-dependencies.zip 在此包中考入spring

aopalliance/aopalliance.jar 
aspectj/aspectjrt.jar 
aspectj/aspectjweaver.jar 
cglib/cglib-nodep-2.1_3.jar 
jakarta-commons/commons-pool.jar 
jakarta-commons/commons-dbcp.jar 
jakarta-commons/commons-logging.jar 

    大家可以看到有了spring2.5.6的包 3.0所需要的其他类就能在其中找比较方便。

    注意:cglib-nodep-2.1_3.jar   包也可以换成asm-2.2.3.jar和cglib-2.2.jar



 

 3、struts2.2.1 配置

 

struts2-2.2.1-all.zip 中加入如下jar   

lib/ognl-3.0.jar  
lib/xwork-core-2.2.1.jar 
lib/freemarker-2.3.16.jar 
lib/struts2-core-2.2.1.jar 
lib/struts2-spring-plugin-2.2.1.jar 
lib/commons-io-1.3.2.jar 
lib/commons-fileupload-1.2.1.jar 
lib/commons-logging-1.0.4.jar

javassist-3.7.ga.jar //这个包在lib下没有;从apps/struts2-blank-2.2.1.war中的lib文件里找到

   注意:如果使用ognl的jar包是2.7以下的就不用 javassist-3.7.ga.jar 了

 

     到此为止所有的jar包就加完毕了 javassist-3.7.ga.jar 和 commons-logging.jar 已经重复删除不需要的(保留版本高的就行)。总共是44个jar

 



  

 

四、XML文件配置 

<?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:context="http://www.springframework.org/schema/context"
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context-2.5.xsd
           http://www.springframework.org/schema/aop
           http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
           http://www.springframework.org/schema/tx 
           http://www.springframework.org/schema/tx/spring-tx-2.5.xsd">
	<!-- 用注解方式注入bean -->
	<context:annotation-config/>
	<context:component-scan base-package="com.yj"/>
	<!-- 数据库连接池 -->
	<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
		<property name="driverClassName" value="com.mysql.jdbc.Driver" />
		<property name="url" value="jdbc:mysql://localhost:3306/sshtest" />
		<property name="username" value="root" />
		<property name="password" value="root" />
	</bean>
	<!-- hibernate sessionFactory 创建 -->
	<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
		<property name="dataSource" ref="dataSource"/>
		<property name="packagesToScan">
			<list>
				<value>com.yj.model</value>
			</list>
		</property>
		<property name="hibernateProperties">
			<props>
				<prop key="hibernate.format_sql">true</prop>
				<prop key="hibernate.hbm2ddl.auto">update</prop>
				<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
			</props>
		</property>
	</bean>
     <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
     	<property name="sessionFactory" ref="sessionFactory"></property>
     </bean>     
     <!-- 事物配置 -->
     <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
     	<property name="sessionFactory" ref="sessionFactory"></property>
     </bean>
     <tx:advice id="txAdvice" transaction-manager="transactionManager">
     	<tx:attributes>
     		<tx:method name="find*" read-only="true"/>
     		<tx:method name="add*" propagation="REQUIRED"/>
     	</tx:attributes>
     </tx:advice>
     <aop:config>
     	<aop:pointcut expression="execution(public * com.yj.service..*.*(..))" id="myPointcut"/>
     	<aop:advisor advice-ref="txAdvice" pointcut-ref="myPointcut"/>
     </aop:config>
     
</beans>

 

 

 

<?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">
	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>classpath:applicationContext.xml</param-value>
	</context-param>
	<listener>
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
	</listener>
	<filter>
		<filter-name>openSessionInViewFilter</filter-name>
		<filter-class>
			org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>openSessionInViewFilter</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>
</web-app>

 

   注意:1、只用在spring中配置了事物才能在web.xml配置openSessionInViewFilter

             否则会出错。

             2、openSessionInViewFilter必须配置在strutsfilter之前。

 

结束:我把自己的demo上传到附件 没有jar文件需要的自己下载把,也可以联系我。关于demo中的问题是service和demo都没有提取接口这样在开发中是不允许的。各位不要学我

 

在demo中我所有的测试spring 的测试 需要junit-4.4以上版本。用这个测试的好处是测试不会破坏数据库的内容,因为是事物级的测试。

 

package com.yj.service;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;

import com.yj.model.User;

@ContextConfiguration("classpath:applicationContext.xml")
public class UserServiceTest extends AbstractTransactionalJUnit4SpringContextTests {
	
	@Autowired
	private UserService userService;

	@Test
	public void testSave() {
		User user = new User();
		user.setPassword("1234");
		user.setUsername("张三3");
		userService.save(user);
	}

	@Test
	public void testExits() {
		UserService userService = new UserService();
		User user = new User();
		user.setPassword("1234");
		user.setUsername("张三");
		userService.exits(user.getUsername());
		
	}

}

 

由于时间关系在这里没有给大家介绍每个jar的作用。 

  • 大小: 59.4 KB
  • 大小: 17.4 KB
  • 大小: 78.8 KB
  • 大小: 17.3 KB
  • ssh.rar (18 KB)
  • 下载次数: 1781
27
0
分享到:
评论
18 楼 neusoft_jerry 2014-08-17  
跟轻量级J2EE企业应用实战(第3版)。。。。用的ssh版本是一样一样的啊
17 楼 lxl631 2013-11-06  
支持一下,按照楼主提供的,完美运行。  
16 楼 javagongcheng 2013-04-09  
谢谢 我搭建成功了 ..
15 楼 JonasChen 2012-09-25  
pdbnet 写道
我下载了代码运行时报错。

org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]; Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES)); nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:908)
com.yj.dao.UserDAO.findByUsername(UserDAO.java:31)
com.yj.service.UserService.exits(UserService.java:29)
com.yj.service.UserService$$FastClassByCGLIB$$6238af41.invoke(<generated>)
net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
com.yj.service.UserService$$EnhancerByCGLIB$$e2c8392a.exits(<generated>)
com.yj.action.UserAction.addUser(UserAction.java:37)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
是什么原因啊?

我也是出现这个问题。怎么回事呢。
14 楼 datouren 2012-07-28  
您好!  我按照您的试了一下 出现这个错误,输入用户名和密码后 提交 就出错了,但是如果数据库存在这个用户名的话  是没问题的,这个org.springframework.dao.InvalidDataAccessApiUsageException: Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn your Session into FlushMode.COMMIT/AUTO or remove 'readOnly' marker from transaction definition.

------------------
应该是事务哪里错了吧 ,期待您的解决方法
我的Q:907003340
13 楼 todayword 2012-06-21  
很好的文章,给初学者很大的指导作用!
12 楼 yj10864 2011-12-12  
danganxi521 写道
缺少struts-config.xml文件

struts2需要struts-config.xml文件吗?
11 楼 danganxi521 2011-10-31  
缺少struts-config.xml文件
10 楼 munandong 2011-08-07  
支持,谢谢。
9 楼 xinxiaolin 2011-06-10  
步骤很清晰,很详尽。谢谢LZ的分享精神。
8 楼 lvsenlin 2011-03-03  
作者整理的很好,MARK一下
7 楼 pdbnet 2010-12-25  
代码是你上传的那个ssh.rar
6 楼 yj10864 2010-12-25  
把你的源码发到我邮箱yj10864@163.com 我看看!
5 楼 pdbnet 2010-12-25  
我把包导进项目,在mysql中建立数据库,启动Tomcat,提交访问页面就报错了。
4 楼 pdbnet 2010-12-25  
密码是正确的.
3 楼 yj10864 2010-12-25  
数据库连接出错,看看密码对不对
2 楼 pdbnet 2010-12-25  
我下载了代码运行时报错。

org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]; Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES)); nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:908)
com.yj.dao.UserDAO.findByUsername(UserDAO.java:31)
com.yj.service.UserService.exits(UserService.java:29)
com.yj.service.UserService$$FastClassByCGLIB$$6238af41.invoke(<generated>)
net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:688)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:621)
com.yj.service.UserService$$EnhancerByCGLIB$$e2c8392a.exits(<generated>)
com.yj.action.UserAction.addUser(UserAction.java:37)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:452)
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:291)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:254)
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:176)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:263)
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:133)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:207)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:190)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:243)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:100)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:141)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:142)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:166)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:176)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:190)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:187)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:248)
org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)
org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:91)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
是什么原因啊?
1 楼 4351901 2010-12-03  
学习了 支持一下

相关推荐

    ssh(struts2.2.1+_hibernate3.6+spring3.0.5)整合配置

    下面将详细介绍如何整合Struts2.2.1、Hibernate3.6和Spring3.0.5。 首先,确保准备好所有必要的库文件,包括: 1. Struts2的struts2-2.2.1-all.zip 2. Hibernate的hibernate-distribution-3.6.0.Final-dist.zip 3. ...

    SSH(Struts2.2.1+Hibernate3.6+Spring3.0.5)+json框架包

    已经完全打包制作的SSH框架,手动搭建,亲测可用!并且已经包含了jquery,json等插件,可直接使用Ajax功能!由于文件大小限制,jar包中删除了hibernate的核心jar,需要大家自己下个添加,其余jar包已经完整!测试...

    ssh(struts2[1].2.1+_hibernate3.6+spring3.0.5)整合配置.doc

    在本文中,我们将详细介绍如何手动配置SSH(Struts2 2.2.1、Hibernate 3.6和Spring 3.0.5)的整合。 首先,你需要准备好以下软件和库: 1. Struts2的最新版本,这里是Struts2 2.2.1,对应的压缩包为`struts2-2.2.1...

    Struts_2+Spring_3+Hibernate整合开发.part5.rar

    其中Struts 2升级到2.2.1,Spring升级到3.0.5,Hibernate升级到了3.6.0。本书还全面介绍了Servlet 3.0的新特性,以及Tomcat 7.0的配置和用法,本书的示例应该在Tomcat 7.0上运行。  本书重点介绍如何整合Struts ...

    Struts_2+Spring_3+Hibernate整合开发

    其中Struts 2升级到2.2.1,Spring升级到3.0.5,Hibernate升级到了3.6.0。本书还全面介绍了Servlet 3.0的新特性,以及Tomcat 7.0的配置和用法,本书的示例应该在Tomcat 7.0上运行。  本书重点介绍如何整合Struts ...

    Struts_2+Spring_3+Hibernate整合开发.part1

    其中Struts 2升级到2.2.1,Spring升级到3.0.5,Hibernate升级到了3.6.0。本书还全面介绍了Servlet 3.0的新特性,以及Tomcat 7.0的配置和用法,本书的示例应该在Tomcat 7.0上运行。  本书重点介绍如何整合Struts ...

    Struts_2+Spring_3+Hibernate整合开发.part2.rar

    其中Struts 2升级到2.2.1,Spring升级到3.0.5,Hibernate升级到了3.6.0。本书还全面介绍了Servlet 3.0的新特性,以及Tomcat 7.0的配置和用法,本书的示例应该在Tomcat 7.0上运行。  本书重点介绍如何整合Struts ...

    Struts_2+Spring_3+Hibernate整合开发.part3.rar

    其中Struts 2升级到2.2.1,Spring升级到3.0.5,Hibernate升级到了3.6.0。本书还全面介绍了Servlet 3.0的新特性,以及Tomcat 7.0的配置和用法,本书的示例应该在Tomcat 7.0上运行。  本书重点介绍如何整合Struts ...

Global site tag (gtag.js) - Google Analytics