将log4j的配置文件配置上,贴一下具体的异常问题。从配置文件上看,好像看不出有什么错误。提供错误信息,针对错误解决比较容易些~

解决方案 »

  1.   

    给你能运行的现成例子:
      http://www.itfuture.org/xiangm.jsp
      

  2.   

    楼主 我找了半天 这么不见你的业务bean?
    bean /login的依赖注入也没有
    报错的提示也没有  没头没脑的  怎么看。 
      

  3.   

    要在事例struts1.2+spring2.0+hibernate3.0出现如下问题:
    HTTP Status 404 - Servlet action is not available
    --------------------------------------------------------------------------------
    type Status report
    message Servlet action is not available
    description The requested resource (Servlet action is not available) is not available. 
    这个就是运行的时候出现的错误呀..后台没有错误提示!
    PS:若把有关Hibernate的配置去掉的话..运行就可以了
      

  4.   

     <!-- 对象Dao配置 -->
       <bean id="userDao" class="edu.mju.service.UserDao">
         <property name="sessionFactory">
           <ref local="sessionFactory"/>
         </property>
       </bean> 这个不就是业务bean吗?!!
      

  5.   

    哦 明白: 
    设计就有问题:DAO层bean和业务Bean怎么都没分离<!-- Action的配置,接管struts对Action的管理 --> 
    <bean name="/login" class="edu.mju.ui.action.LoginAction"> 
    </bean> 
    /login中没注入业务Bean,对于你的配置来说,就是/longin中没注入userDao改为:
    <bean name="/login" class="edu.mju.ui.action.LoginAction"> 
      <property name="userDao" ref="userDao" />
    </bean> 
      

  6.   

    Action类里的代码,业务逻辑都被我注释掉了...
    LoginForm loginForm = (LoginForm) form;
    String username=loginForm.getUsername();
    String password=loginForm.getPassword();
    return mapping.findForward("success");
    /*
        //调用userDao方法
    if(userDAO.isValidUser(username, password)){
    return mapping.findForward("success");
    }else{
    return mapping.findForward("fail");
    }
    */现在问题是有配置关于hibernate的东西就会出来HTTP Status 404 - Servlet action is not available 
    若只有struts与spring就不会有问题了!!!!
      

  7.   

    SSH整合先运行一下整合的包是否齐备,再去查业务逻辑是否有错。
      

  8.   

    加入log4j 查看详细日志 一定会找到报错信息的错误的可能:
    1.没有配置好
    2.类包版本冲突具体还得看你的日志。HTTP Status 404 - Servlet action is not available 
    -------------------------------------------------------------------------------- 
    type Status report 
    message Servlet action is not available 
    description The requested resource (Servlet action is not available) is not available.  
    这样的报错 说明你的整个web应用没有启动成功
    报错信息远远不止这些;log4j可以提供帮助的