This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Struts and the fly likes There is no action mapped etc.. In Struts 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "There is no action mapped etc.. In Struts 2" Watch "There is no action mapped etc.. In Struts 2" New topic

There is no action mapped etc.. In Struts 2

Julien Marchal

Joined: Jul 14, 2012
Posts: 8
Hello ! Yet another question on this I know, but let me just say I looked everything else or about. So, I'm currently building the structure of my Struts 2 Project. I use Struts 2.3.4, JBoss 7.1 and Eclipse Indigo. I also included all the necessary jar into my project. The problem is when I run my application (Add project to Jboss, Run On Server) and go "http://localhost:8080/booxstore/" I get this:

Etat HTTP 404 - There is no Action mapped for namespace [/] and action name [] associated with context path [/booxstore]

My project :

My web.xml :

My struts.xml (not even used since welcome file isn't working) :

My action :

My JSP just have plain text and have imported struts 2 tags. Basically no matter what I do I can't get a resource. If I go to "http://localhost:8080/booxstore/" or "http://localhost:8080/booxstore/DisplayAction" I get "There is no action mapped" and if I tried to access directly the jsp I get a 404. Please note my war is deployed and enabled on the server.

I'd like to know what I did wrong here, because I don't see it, thanks.
Sandeep Gabhale

Joined: Nov 10, 2008
Posts: 12

Hi Julien,

The Error clearly states the action mapped is not able to search at the "Default" namespace which is declared in the struts.xml.

Your struts.xml contains package namespace="/", which means the struts2 Filter will search for the center.jsp in the default namespace and your default namespace is where you've placed your index.jsp.

So, either place your center.jsp where your index.jsp exists and remove "/pages" from the result tag or make the package namespace="/pages" by keep the center.jsp as it is and try it.

Hope you came to know where you made mistake.

Julien Marchal

Joined: Jul 14, 2012
Posts: 8
Thanks for your answer. I solved it. It was indeed because of the location of my JSPs. They shouldn't have been in META-INF
vengat raman

Joined: Aug 05, 2013
Posts: 1
Yes Great yaar ..Me also got this issue and after long time,i changed the struts.xml to src folder location.after that changes that was working fine...Main thing is Project structure should be proper.
Thanks a lot yaar..
I agree. Here's the link:
subject: There is no action mapped etc.. In Struts 2
It's not a secret anymore!