wood burning stoves 2.0*
The moose likes Struts and the fly likes Error in Struts 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 "Error in Struts " Invalid path was requested"" Watch "Error in Struts " Invalid path was requested"" New topic
Author

Error in Struts " Invalid path was requested"

Ajinkya Parakh
Greenhorn

Joined: Sep 06, 2010
Posts: 8

Hello All,
Now I am trying my hands on struts. I have wriiten simple application in struts and it is yet to be complete.
Whenever I pass ajax request in struts it give me error "SEVERE: Invalid path /pages/login was requested".
I know I am making blunder somewhere please help me to figure it out.

1) web.xml file


2) struts-config.xml file


3) LoginAction.java file ( Action class )

4) index.jsp

Regards-
Ajinkya Parakh.


http://www.ajinkyaparakh.com/
Ajinkya Parakh
Greenhorn

Joined: Sep 06, 2010
Posts: 8

"System.out.println(labName);" in LoginAction is not executed.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Welcome to JavaRanch! Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read. You can edit your post by using the button.
Ajinkya Parakh
Greenhorn

Joined: Sep 06, 2010
Posts: 8

David Newton wrote:Welcome to JavaRanch! Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read. You can edit your post by using the button.


Thanks David. I have added the code tag. :)
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

This doesn't really have anything to do with Struts yet, so I'm moving it to HTML/JavaScript.

1) Why are you using the "new" keyword? You should just be setting xmlhttp to the results of calling the function.
2) Why are you doing Ajax "by hand"? Use a JavaScript framework--it will make you life *much* easier.
Ajinkya Parakh
Greenhorn

Joined: Sep 06, 2010
Posts: 8

Thanks David I got it done. This was my first post on Javaranch
and really pleased by your prompt reply.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Glad we could help, and that you worked it out :)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Error in Struts " Invalid path was requested"
 
Similar Threads
Switching form action based upon radio selection
struts 1.beginner, code not working
web portal in struts and nothing is working at all
Problem getting servlets working
A problem in hiding a button