File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes struts Action mapped  error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "struts Action mapped  error" Watch "struts Action mapped  error" New topic
Author

struts Action mapped error

Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
Here is my struts project war file.
I think it is ok including this site.If not please don't banned my account.

http://www.megaupload.com/?d=QH6OB51A

when i run http://localhost:8080/My/my/HelloWorld.action it gives this error


i don't know why?
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
but if i try this url
http://localhost:8080/My/my/HelloWorld

it gives this error?


please anyone answer my question.
I am new to struts and i have this problem now 3 days.
I can't proceed without doing this.
I am reading ManningStruts2inAction book.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

How do you expect anybody to help if you don't post your configuration? Don't append a WAR file--that's basically asking us to download, check the code for potential security issues, deploy, run, and debug.

Let's just jump right to the debug part. Post your config.
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
this is web.xml which is in WEB-INF folder



this is struts.xml which is in WEB-INF


this is HelloWorld.jsp which is in WebContent folder



this is Struts2HelloWorld.java class


David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Your package's namespace is "/roseindia".
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
Oho,thanks,thanks

finally after 4 days it works.
Samanthi perera
Ranch Hand

Joined: Jan 08, 2010
Posts: 510
anyway i need to know how to run my action without typing "action" at last of URl?
example
now i am typing
http://localhost:8080/My/my/Struts2HelloWorld.action

i need to run my action using this url
http://localhost:8080/My/my/Struts2HelloWorld

how can i archive this?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please start new topics for new questions.

Use Struts 2.1, which has this enabled by default, or set the action extension constant.

I would *strongly* recommend spending some time with the Struts 2 documentation before proceeding much further; it will save you a *lot* of time and effort.
 
 
subject: struts Action mapped error