ssh框架搭建错误集合

1,把jsp放入到WEB-INF/view目录下,struts2.xml配置<result name="success">/WEB-INF/view/home.jsp</result>,访问404的原因?

解决方法:http://www.cnblogs.com/dynasty/archive/2012/07/21/2601955.html
要添加struts2-convention-plugin(在struts2/lib目录下有)插件,同时此插件依赖asm-commons-3.3.jar,asm-3.3.jar和asm-tree-3.3.jar。
详情在http://www.cnblogs.com/freeabyss/p/3325252.html

在struts2.xml配置 <struts> 节点内配置<constant name="struts.convention.result.path" value="/WEB-INF/view/" />

2,在UserDaoHibernate中使用 getSessionFactory().getCurrentSession()出现 Could not obtain transaction-synchronized Session for current thread 错误?
解决办法:受这篇文章http://www.cnphp6.com/archives/112574启发,在applicationContext.xml配置
<bean id="transactionManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>
在UserDaoHibernate类上加注解@Transactional,解决问题。

原文地址:https://www.cnblogs.com/Bonker/p/5670604.html