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

  • 相关阅读:
    高级查询
    简单查询
    CRUD
    T-SQL语句
    数据库规范
    导出含有特定字符串的注册表
    .net、jquery、ajax、wcf实现数据库用户名检测局部刷新
    数据结构实验之二叉树二:遍历二叉树
    传纸条
    数据结构实验之栈与队列五:下一较大值(一)
  • 原文地址:https://www.cnblogs.com/soundcode/p/1911886.html
Copyright © 2011-2022 走看看