servlet action is not available

简介:
Servlet action is not available解决方法

问题原因:
1.、web.xml文件中未配置ActionServlet。
2、struts-config.xml文件未配置你要访问的Action。
3、你的jsp文件form标记中action属性的路径名称错误。
针对以上3种情况相应的解决方案如下:
1、在web.xml文件中加上ActionServlet的配置信息

    action
    org.apache.struts.action.ActionServlet
    
      config
      /WEB-INF/struts-config.xml
    
    
      debug
      0
    
    
      detail
      0
    
    2
    
2、在struts-config.xml文件检查你要访问的Action配置文件。
3、检查jsp文件form标记中action属性的路径名称是否与struts-config.xml文件中action标记的path属性的路径名称一致。
--------------------------------------------------------------------------------
Spring 错误
去掉struts配置文件中的datasource配置
1  试一下拷贝commons-beanutils.jar和commons-digester.jar到WEB-INF\lib.
2  <plug-in
        className="org.springframework.web.struts.ContextLoaderPlugIn">
        <set-property property="contextConfigLocation"
            value="/WEB-INF/classes/applicationContext.xml" />
    </plug-in>
applicationContext.xml的位置错了
3 在spring的配置文件下的插入hibernate的配置文件路径错误
4 还有就是一定要在struts配置文件中加: <controller processorClass="org.springframework.web.struts.DelegatingRequestProcessor"/>。这样你的action才能真的委托给spring。
5 myeclipse没有把spring.jar拷贝到lib下


--------------------------------------------------------------------------------------

非以上情况的解决办法就是检查web容器的log日志,如果时tomcat则检查下logs目录下的localhost_log文件,看里边是否记录有错误信息,然后根据错误信息提示将其纠正。



本文转自左正博客园博客,原文链接:http://www.cnblogs.com/soundcode/archive/2010/12/20/1911886.html,如需转载请自行联系原作者

目录
相关文章
spring3 springfox报错Type javax.servlet.http.HttpServletRequest not present
spring3 springfox报错Type javax.servlet.http.HttpServletRequest not present
1377 0
|
Java
The superclass “javax.servlet.http.HttpServlet“ was not found on the Java Build Path的解决方案
The superclass “javax.servlet.http.HttpServlet“ was not found on the Java Build Path的解决方案
647 0
The superclass “javax.servlet.http.HttpServlet“ was not found on the Java Build Path的解决方案
|
前端开发 JavaScript
这篇文章介绍了如何使用form表单结合Bootstrap格式将前端数据通过action属性提交到后端的servlet,包括前端表单的创建、数据的一级和二级验证,以及后端servlet的注解和参数获取。
这篇文章介绍了使用AJAX技术将前端页面中表单接收的多个参数快速便捷地传输到后端servlet的方法,并通过示例代码展示了前端JavaScript中的AJAX调用和后端servlet的接收处理。
这篇文章介绍了如何使用form表单结合Bootstrap格式将前端数据通过action属性提交到后端的servlet,包括前端表单的创建、数据的一级和二级验证,以及后端servlet的注解和参数获取。
|
Java 应用服务中间件 Apache
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path类似问题简单解决方案
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path类似问题简单解决方案
600 0
The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path类似问题简单解决方案
|
Java Maven
maven jsp报错javax.servlet.http.HttpServlet“ was not found on the Java Build Path
maven jsp报错javax.servlet.http.HttpServlet“ was not found on the Java Build Path
307 0
|
Java 应用服务中间件 Apache
springMvc14-the superclass “javax.servlet.http.HttpServlet” was not found
springMvc14-the superclass “javax.servlet.http.HttpServlet” was not found
252 0
|
Java 应用服务中间件 Apache
JavaWeb:报错信息The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path
JavaWeb: 报错信息The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path 好久不写Jsp,今天建立了一个Javaweb工程,并在eclipse中配置了Web容器Tomcat。
2912 0