zoukankan      html  css  js  c++  java
  • 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文件,看里边是否记录有错误信息,然后根据错误信息提示将其纠正。

  • 相关阅读:
    Docker容器监控(十)--技术流ken
    Docker跨主机通信(九)--技术流ken
    Docker多主机管理(八)--技术流ken
    Docker公共&本地镜像仓库(七)--技术流ken
    Docker镜像构建的两种方式(六)--技术流ken
    Docker网络(五)--技术流ken
    tomcat使用详解(week4_day2)--技术流ken
    haproxy使用演示--技术流ken
    xshell连接虚拟机详解--技术流ken
    grafana使用详解--技术流ken
  • 原文地址:https://www.cnblogs.com/soundcode/p/1911886.html
Copyright © 2011-2022 走看看