1. 程式人生 > >There is no Action mapped for namespace [/] and action name [Login] associated

There is no Action mapped for namespace [/] and action name [Login] associated

pat rop back 圖片 src 兩個 ont person 大小

使用struts2時出現了:

There is no Action mapped for namespace [/] and action name [Login] associated

兩個可能的錯誤:

1.struts.xml大小等寫錯,或者不是放在src目錄下。

解決方法:項目右鍵 -》properties -》Java Build Path -》source -》技術分享圖片,要放在webRoot/WEB-INF目錄下

2.可能是使用了通配符來配置。

struts2.5後,使用通配符的方式實現動態方法調用要在
<action name="action_*" class="personList" method="{1}">
<allowed-methods>add,addUI,list</allowed-methods>


</action>
action加入<allow-methods>方法名(可多個)</allowmethods>
這個配置項.

There is no Action mapped for namespace [/] and action name [Login] associated