aspose file tools*
The moose likes Struts and the fly likes There is no Action mapped for namespace / and action name . - [unknown location] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "There is no Action mapped for namespace / and action name . - [unknown location]" Watch "There is no Action mapped for namespace / and action name . - [unknown location]" New topic
Author

There is no Action mapped for namespace / and action name . - [unknown location]

maggie karve
Ranch Hand

Joined: Dec 29, 2009
Posts: 187
Hi,
I am a newbie in Struts 2...
i am trying to execute a Login.jsp and i am using eclipse as the development environment....i have stored the struts.xml in ApplicationResources.properties file......

but when i run the program i get....

There is no Action mapped for namespace / and action name . - [unknown location]
...
i went through previous links in javaranch which had same posts but even though i made changes like puttings struts.xml under WeB-InF dirrectory and all...my problem is not getting solved...thanks...
Sam Rakshit
Greenhorn

Joined: Jun 22, 2010
Posts: 8
maggie joseph wrote:Hi,
I am a newbie in Struts 2...
i am trying to execute a Login.jsp and i am using eclipse as the development environment....i have stored the struts.xml in ApplicationResources.properties file......

but when i run the program i get....

There is no Action mapped for namespace / and action name . - [unknown location]
...
i went through previous links in javaranch which had same posts but even though i made changes like puttings struts.xml under WeB-InF dirrectory and all...my problem is not getting solved...thanks...


Try creating an action in struts which would have a result entry like :

<action name="start">
<result>/login.jsp</result>
</action>

Then try to direct your website to this location : http://localhost:8080/start

That should work if you are in Tomcat (change the port accordingly)

To make it the default page, make an entry of the /start in the <welcome-file-list> in web.xml

hope that helps!!!

Ankit Garg
Sheriff

Joined: Aug 03, 2008
Posts: 9319
    
  17

i have stored the struts.xml in ApplicationResources.properties file......

You've placed your xml file in a properties file?? The struts.xml is supposed to go into the WEB-INF/classes directory. So you should put it in the root of your source folder in your eclipse project (the place where any classes with no package goes). After that you need to show us some code, what does your struts.xml look like, your Action class' code, what URL are you entering in the browser??


SCJP 6 | SCWCD 5 | Javaranch SCJP FAQ | SCWCD Links
maggie karve
Ranch Hand

Joined: Dec 29, 2009
Posts: 187
I am just tying to execute an example from the tutorial available in this link..my code is the same as

http://java.dzone.com/articles/struts2-tutorial-part-27

i have placed my files in eclipse as mentioned in the tutorial.....
still i have getting error.....i have placed the same struts.xml file under WEB-INF/classes folder..........
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Turn devMode on, set the log level to DEBUG, and check the startup logs; we'll go from there. Also post the config and deployed directory tree.
maggie karve
Ranch Hand

Joined: Dec 29, 2009
Posts: 187
Hi...this is what i get when i put devmode on..



I am using Struts 2.1.8.1.....

and my directory for strut.xml is
C:\Software\Tomcat 6.0\webapps\testapp\WEB-INF\classes\struts.xml and rest all the files i have made are in the same path as mentioned in the tutorial....i have put the jsp files Login.jsp and Welcome.jsp in C:\Software\Tomcat 6.0\webapps\testapp directory.....i even made the same jsp and deployed it in eclipse under

C:\Software\workspace\StrutsHelloWorld\WebContent folder......

is there anything else that i am missing???
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

David Newton wrote:Turn devMode on, set the log level to DEBUG, and check the startup logs; we'll go from there. Also post the config and deployed directory tree.
maggie karve
Ranch Hand

Joined: Dec 29, 2009
Posts: 187
I am getting error while starting Tomcat...

i set the devmode on by including struts.properties file



and struts.xml file

when i started Tomcat i am getting the foll...
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

You'll need to satisfy the missing dependencies before proceeding.
M Turner
Greenhorn

Joined: Dec 16, 2009
Posts: 25
Maggie,

Although the IDE puts a copy of struts.xml in your WEB-INF/classes folder when it builds your project. You will need to have a copy in your /src folder. Mine is in the root of my Java Resources/src folder.

Also, my IDE blows up when in "dev mode" - I don't recommend it.

Good luck,
Marcella
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

The issue is with the missing dependencies, as the stack trace states.

If your IDE "blows up" with devMode on then something is wrong with your IDE setup; I run in devMode during development under several IDEs without issue.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: There is no Action mapped for namespace / and action name . - [unknown location]