• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

HTTP Status 404 - There is no Action mapped for namespace [/] and action name

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I stuck with this Exception :HTTP Status 404 - There is no Action mapped for namespace [/] and action name
I searched a lot but no hope

web.xml



struts.xml



Action



 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do you call it in jsp side ?
 
Orex Bayn
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ivan Krasic wrote:how do you call it in jsp side ?



just a very very simple jsp

 
Ivan Krasic
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in web.xml add



add a new page called : index.jsp

and with code

 
Orex Bayn
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
same error

type Status report

message There is no Action mapped for namespace [/] and action name [hello] associated with context path [/HelloProject].

description The requested resource is not available.

 
Ivan Krasic
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Orex Bayn wrote:same error

type Status report

message There is no Action mapped for namespace [/] and action name [hello] associated with context path [/HelloProject].

description The requested resource is not available.



plz make sure in the meta is like that

<META HTTP-EQUIV="Refresh" CONTENT="0;URL=abcAction.action">
 
Orex Bayn
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sorry but same error
 
Ivan Krasic
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Orex Bayn wrote:I'm sorry but same error



normally should work fine mate

here you my files

struts.xml



HelloAction.java


Hello.jsp


index.jsp


web.xml

 
Orex Bayn
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I make a new project and copy and past your code

unfortunately I got another exception

java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter

I searched to solve this exception and found the exception come from messing jar file struts2-core 2.3 and I'm sure I putted into webcontent/web-inf/lib

another solution : in project properties > java built path > I added Apache tomcat

nothing happen still not found the class

 
Ivan Krasic
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mate look where you are putting the jsp page inside (WEB-INF/content)

should in WebContent directly in your case
 
Orex Bayn
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ivan Krasic wrote:mate look where you are putting the jsp page inside (WEB-INF/content)

should in WebContent directly in your case



I did and I tried to mapping in both ways : with configuration in struts.xml and by convention based configuration

still stuck with exception: There is no Action mapped for namespace [/]

 
Ivan Krasic
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Orex Bayn wrote:

Ivan Krasic wrote:mate look where you are putting the jsp page inside (WEB-INF/content)

should in WebContent directly in your case



I did and I tried to mapping in both ways : with configuration in struts.xml and by convention based configuration

still stuck with exception: There is no Action mapped for namespace [/]



anyway here you a working example

let me know what is wrong with yours

 
Orex Bayn
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Ivan Krasic wrote:

Orex Bayn wrote:

Ivan Krasic wrote:mate look where you are putting the jsp page inside (WEB-INF/content)

should in WebContent directly in your case



I did and I tried to mapping in both ways : with configuration in struts.xml and by convention based configuration

still stuck with exception: There is no Action mapped for namespace [/]



anyway here you a working example

let me know what is wrong with yours



First Really I want to thank you sooo much for your help

I copied your code and make with it a new project

but still the same error :There is no Action mapped for namespace [/]

this is my WAR file for the new project with your code

https://www.mediafire.com/?nvp5p4bidgn80en
 
Ivan Krasic
Ranch Hand
Posts: 50
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Orex Bayn wrote:

Ivan Krasic wrote:

Orex Bayn wrote:

Ivan Krasic wrote:mate look where you are putting the jsp page inside (WEB-INF/content)

should in WebContent directly in your case



I did and I tried to mapping in both ways : with configuration in struts.xml and by convention based configuration

still stuck with exception: There is no Action mapped for namespace [/]



anyway here you a working example

let me know what is wrong with yours



First Really I want to thank you sooo much for your help

I copied your code and make with it a new project

but still the same error :There is no Action mapped for namespace [/]

this is my WAR file for the new project with your code

https://www.mediafire.com/?nvp5p4bidgn80en



alright you got 2 minor error to get it working

-rename struts2.xml to struts.xml

-in struts.xml you put invalid package class name : class="com.simpleprogrammer.action.HelloAction" , as you can see action is extra
instead put : class="com.simpleprogrammer.HelloAction"

Regards
 
Orex Bayn
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
wooooorking

thank you very much
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!