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文件,看里邊是否記錄有錯誤信息,然后根據錯誤信息提示將其糾正。
總結
以上是生活随笔為你收集整理的servlet action is not available的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Spring 事务处理参数
- 下一篇: 为什么要进行二手车去中介化?