Meaningless Drivel is fun!*
The moose likes Struts and the fly likes HTTP Status 404 - /Struts2Application1/clientAction + Please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "HTTP Status 404 - /Struts2Application1/clientAction + Please help" Watch "HTTP Status 404 - /Struts2Application1/clientAction + Please help" New topic

HTTP Status 404 - /Struts2Application1/clientAction + Please help

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 753
Hi i have written my first struts application

but i am getting following error when i submit the form

HTTP Status 404 - /Struts2Application1/clientAction

this same example runs which i have downloaded from black book website

i am not able to figure out the problem

please help

Bellow is my action class

Struts.xml (which is in classpath)



Please help me solve this issue.

Jigar Naik

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 753
Attached is the war file of my application which also contains source code (.java file)

Rename Struts2Application1.jpg to Struts2Application1.war


Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 753
[color=red]Dear Ranchers I got bellow error while uploading the attachment at first time

Davie Lin
Ranch Hand

Joined: Aug 05, 2007
Posts: 294
Your struts.xml have no namespace attribute in the <package> tag

maybe you should try

that's my guess, give it a try
David Newton

Joined: Sep 29, 2008
Posts: 12617

Not sure what that non-Struts stuff is, but it's possible it's interfering with Struts 2's default file upload mechanism: I'd suggest using only one method to handle file uploads. Taking out the "upload" interceptor may be enough to use whatever mechanism is causing the exception you're seeing, although I'd probably recommend just using the S2 functionality.
Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 753
Issue resolved..

The directory structure of dynamic web project (eclipse), struts could not understand that.

By changing he directory struture everything worked fine

Bellow structure worked fine.
It is sorta covered in the JavaRanch Style Guide.
subject: HTTP Status 404 - /Struts2Application1/clientAction + Please help
Similar Threads
Request not able to reach Action class in Struts2
Struts2 - execAndWait Interceptor
The Struts dispatcher cannot be found Error
Unable to Map Action to namespace -- new to Struts