zoukankan      html  css  js  c++  java
  • 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,解决问题。

  • 相关阅读:
    Zend Guard 7 , Zend Guard Loader处理PHP加密
    [转]pHP源码加密方法调查
    使用USB Key(加密狗)实现身份认证
    4*4行列式矩阵键盘
    HDU-2546-饭卡
    HDU-2073-无限的路
    HDU-2065-"红色病毒"问题
    HDU-2063-过山车
    HDU-2060-Snooker
    HDU-2056-Rectangles
  • 原文地址:https://www.cnblogs.com/Bonker/p/5670604.html
Copyright © 2011-2022 走看看