UserDao怎么写的
好像为sessionFactory提供的setter方法有问题

解决方案 »

  1.   

    觉得好奇怪啊~~
    struts让spring来管理action的时候的配置~~??
    /user放在spring里,Actioclass不是对应的..Action?我用的时候是
    首先在web.xml中配置:<servlet>标签上面:
             <listener>
    <listener-class>
    org.springframework.web.context.ContextLoaderListener
    </listener-class>
    </listener>
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/applicationContext.xml</param-value>
    </context-param>
    然后在struts-config.xml里面:<message-resources/>上面
             <controller>
    <set-property property="processorClass"
    value="org.springframework.web.struts.AutowiringRequestProcessor" />
    </controller>
    这个意思就是让spring来管理action
    action的配置就放在struts中,不用在applicationContext.xml中再配置
    比如我在struts-config.xml中:
    直接              <action attribute="userForm" input="/userEdit.jsp"
    name="userForm" path="/userEdit" scope="request"
    type="com.qust.struts.action.UserEditAction">
    <forward name="success" path="/userDetail.jsp" />
    </action>
    这个/userEdit就不用在applicationContext.xml中再配置了呵呵~~
    我也是刚学不久~~
    不知道能不能帮上你的忙~~
      

  2.   


    <action-mappings > 
        <action  name="userForm" path="/register" scope="request"> 
          <forward name="failuer" path="/failuer.jsp"  redirect="false"/> 
          <forward name="success" path="/success.jsp" redirect="false"/> 
        </action> 
    </action-mappings> 
    action对应的类在哪?
      

  3.   

    你的Hibernate生成DAO的时候,DAO的实现类中没有继承于HibernateDaoSupport,检查一下
      

  4.   

    如果action让spring管理并生成的话
    需要用代理:
    for instance:path="/user"
    type="org.springframework.web.struts.DelegatingActionProxy"
      

  5.   

    在web.xml里没有加入对spring的支持啊
      

  6.   

    1.在web.xml里没有加入对spring的支持
    2UserDao的sessionFactory有没set方法?