action-mapping

Struts2 .action extension causing CSS, JavaScript and Struts Dojo to break

风格不统一 提交于 2019-11-26 21:02:09
We have been running on Struts 2.1.8 for some time and all Struts actions have been working as expected, i.e. href's to the Struts actions are rendered with the action name with no extension. Here is the JSP code that set's up the links: <ul id="top_menu"> <li id="itemHome" class="active"><s:a action="viewHome">Home</s:a></li> <li><s:a action="viewSearch">Search</s:a></li> <li><s:a action="viewBookMarks">My Bookmarks</s:a></li> <li><s:a action="viewSupport">Support</s:a></li> </ul> The links rendered correctly to http://localhost/viewHome , http://localhost/viewSearch , etc. under 2.1.8 We

Unable to get Struts2 Hello World to work using Eclipse and Maven

假如想象 提交于 2019-11-26 11:37:15
问题 This site doesn\'t allow user to ask technical questions to their tutorial which I believe is broken: http://www.mkyong.com/misc/how-to-use-mkyong-tutorial/ I\'m using: maven: 3.2.1 tomcat 7 java 1.7 Eclipse: Luna Release (4.4.0) I\'m getting this message: WARNING: Could not find action or result There is no Action mapped for namespace [/] and action name [] associated with context path [/Struts2Example]. - [unknown location] I can never get to the login.jsp page unless I enter the full url.

Struts 2 : There is no Action mapped for namespace [/]

旧城冷巷雨未停 提交于 2019-11-26 04:01:36
问题 I am new to Struts 2 and I have been following a video tutorial on Struts 2(Koushik). I have created the Struts.xml, the action class and JSPs as same as created in the tutorial. But it gives the following exception. Exception: Jan 13, 2014 9:30:48 PM org.apache.struts2.dispatcher.Dispatcher warn WARNING: Could not find action or result: /Struts2Starter/getTutorial.action There is no Action mapped for namespace [/] and action name [getTutorial] associated with context path [/Struts2Starter].