Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

There is no action mapped etc.. In Struts 2

 
Julien Marchal
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 12
Android Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic