>
在部署Struts時,出現(xiàn)如下錯誤信息:
HTTP Status 404 - Servlet action is not available
type Status report
message Servlet action is not available
description The requested resource (Servlet action is not available) is not available.
問題原因:
1.、web.xml文件中未配置ActionServlet。
2、struts-config.xml文件未配置你要訪問的Action。
3、你的jsp文件form標記中action屬性的路徑名稱錯誤。
4、非以上三種情況。
針對以上4種情況相應(yīng)的解決方案如下:
1、在web.xml文件中加上ActionServlet的配置信息
sE_ ;2H
action h&N`e7lA
org.apache.struts.action.ActionServlet /SfS0g
(lsQ vm9
O%s~1^1WF
c ("%Bv
ly^uMi
8$>f#^]P^1
/}B1sn
N\ Tfz@6c
#K-p
['scVc`M
mi+/p3}
E0S_08h\N|
D p.?{X:
2 2,iz>X!zM
2、在struts-config.xml文件檢查你要訪問的Action配置文件。
3、檢查jsp文件form標記中action屬性的路徑名稱是否與struts-config.xml文件中action標記的path屬性的路徑名稱一致。
4、非以上情況的解決辦法就是檢查web容器的log日志,如果時tomcat則檢查下logs目錄下的localhost_log文件,看里邊是否記錄有錯誤信息,然后根據(jù)錯誤信息提示將其糾正。
< n1W&nB<Zz |