There is no Action mapped for namespace [/] and action name [hello] associated with context path [/

There is no Action mapped for namespace [/] and action name [hello] associated with context path [/struts2].

如果在部署struts2環境後,成功部署了struts2的項目,出現以上問題則是項目中沒有struts.xml文件或者沒有將struts.xml文件部署到web服務器的已發佈項目中

解決方法:在項目中添加struts.xml,將

struts.xml文件部署到web服務器上(選擇項目右鍵->選擇屬性->java構建路徑-》源代碼tab頁面的【構建路徑中的源文件夾】下有沒有包含struts.xml的文件夾,若沒有則通過【添加文件夾】添加struts.xml文件所在的文件夾)


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章