`
shanlingyunjavafuns
  • 浏览: 4170 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

求救struts2+hibernate+spring

阅读更多
javax.servlet.ServletException: Class org.apache.struts2.dispatcher.FilterDispatcher is not a Servlet
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:216)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:634)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
java.lang.Thread.run(Thread.java:595)

我刚用求救struts2+hibernate+spring搭了一个框架来测试,可是当我在提交from表单时发现出现了这个异常,有谁遇到过此类问题,非常感谢你的帮忙解决。
web.xml
---------------------------------------------------------------------
<servlet>
    <filter >    
        <filter-name > struts-cleanup </filter-name >    
        <filter-class >    
            org.apache.struts2.dispatcher.ActionContextCleanUp   
        </filter-class >    
    </filter >     
       
    <filter-mapping >    
        <filter-name > struts-cleanup </filter-name >    
        <url-pattern > /* </url-pattern >    
    </filter-mapping >    
   
<servlet-name>struts2</servlet-name>
<servlet-class>
org.apache.struts2.dispatcher.FilterDispatcher
</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>struts2</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/applicationContext*.xml</param-value>
</context-param>

<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>


struts-config.xml
----------------------------------------------------------------
<action name="loginAction" class="LoginAction">
<result name="success">index.jsp</result>
</action>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics