action-mapping

struts2 conventions plugin not working properly

自闭症网瘾萝莉.ら 提交于 2019-12-06 06:16:06
问题 I was trying to run the application with convention plugin Struts2. The application was fine with struts.xml configured like this: <struts> <package name="struts2demo" extends="struts-default"> <action name="hey" class="action.CountryAction" method="get"> <result name="success">/index.jsp</result> </action> <action name="add" class="action.CountryAction" method="add"> <result type="redirect" name="success">hey</result> </action> <!-- Add your actions here --> </package> </struts> now I

There is no Action mapped for namespace [/] and action name [Test] associated with context path [/TestStruts]. - [unknown location]

僤鯓⒐⒋嵵緔 提交于 2019-12-06 03:54:36
I'm trying my first application on struts 2.3.16 in NetBeans 7.2.1. It shows the following error on entering a URL - http://localhost:8080/TestStruts/Test.action (There is a Test.jsp page). WARNING: Could not find action or result: /TestStruts/Test.action There is no Action mapped for namespace [/] and action name [Test] associated with context path [/TestStruts]. - [unknown location] at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy.java:185) at org.apache.struts2.impl.StrutsActionProxy.prepare(StrutsActionProxy.java:63) at org.apache.struts2.impl

Why welcome-file-list is not working if I remove struts2 .action extension?

前提是你 提交于 2019-11-30 21:07:06
I have a problem if I remove the .action extension inside my Struts2 application. I put this in my struts.xml : <constant name="struts.action.extension" value="" /> The application works correctly except in the index page. I have in my web.xml this: <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> When I access to http://localhost/myApp/ , I get the following error: There is no Action mapped for namespace [/] and action name [index.jsp] associated with context path [/myApp]. - [unknown location] However if I access to http://localhost/myApp/fooAction , I'm not

Why welcome-file-list is not working if I remove struts2 .action extension?

家住魔仙堡 提交于 2019-11-30 17:13:04
问题 I have a problem if I remove the .action extension inside my Struts2 application. I put this in my struts.xml : <constant name="struts.action.extension" value="" /> The application works correctly except in the index page. I have in my web.xml this: <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> When I access to http://localhost/myApp/ , I get the following error: There is no Action mapped for namespace [/] and action name [index.jsp] associated with context

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

≡放荡痞女 提交于 2019-11-29 10:24:44
问题 This question already has an answer here: Struts2 There is no Action mapped for namespace [/] and action name [login] associated with context path [/Struts2Test] 3 answers I've looked through all similar Q's on stackoverflow but it didn't help, sorry. The main difference I have from all of them is that I got EMPTY action name in error message. Googling didn't help :( Hope someone just could give a hint where to look for the source of the problem. thx Error: HTTP Status 404 - There is no

Struts Hello world example : There is no Action mapped for namespace [/] and action name error

自古美人都是妖i 提交于 2019-11-29 03:51:35
i am absolute beginner to Struts2. I am tying to follow tutorials on struts web site. i followed this tutorial . i have some trouble with it. i created dynamic web project on eclipse. Then i followed the tutorial. However when i run the example i get the following error. There is no Action mapped for namespace [/] and action name [hello] associated with context path [/Hello_World_Struts_2]. - [unknown location] i have the following directory structure And my struts.xml file is <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts

Changing struts.xml file name for a multi-module Maven web project

流过昼夜 提交于 2019-11-28 11:44:08
I have a Maven project with multiple modules. Out of four modules, two of them are web modules. Here is the structure. MyProject | |__ api | |__ commons | |__ web_child | |__ web_main web_main module is the main one and it can include web_child module also. web_child module structure is web_child | |__ src/main/java //java action classes and all |__ src/main/resources | |__ struts-config.xml | |__ WEB-INF |__ JSP Pages web_main module structure is web_main | |__ src/main/java //java action classes and all |__ src/main/resources | |__ struts.xml | |__ WEB-INF |__ JSP Pages Both modules are war

Struts Hello world example : There is no Action mapped for namespace [/] and action name error

只谈情不闲聊 提交于 2019-11-27 17:51:57
问题 i am absolute beginner to Struts2. I am tying to follow tutorials on struts web site. i followed this tutorial. i have some trouble with it. i created dynamic web project on eclipse. Then i followed the tutorial. However when i run the example i get the following error. There is no Action mapped for namespace [/] and action name [hello] associated with context path [/Hello_World_Struts_2]. - [unknown location] i have the following directory structure And my struts.xml file is <?xml version="1

Changing struts.xml file name for a multi-module Maven web project

孤街浪徒 提交于 2019-11-27 06:25:08
问题 I have a Maven project with multiple modules. Out of four modules, two of them are web modules. Here is the structure. MyProject | |__ api | |__ commons | |__ web_child | |__ web_main web_main module is the main one and it can include web_child module also. web_child module structure is web_child | |__ src/main/java //java action classes and all |__ src/main/resources | |__ struts-config.xml | |__ WEB-INF |__ JSP Pages web_main module structure is web_main | |__ src/main/java //java action

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

两盒软妹~` 提交于 2019-11-27 05:32:59
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. But even then, when I click on the submit button, it doesn't go to the welcome_user.jsp page either. Can