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 Forword Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts Action Forword" Watch "Struts Action Forword" New topic
Author

Struts Action Forword

Ggaurav Gupta
Greenhorn

Joined: Mar 26, 2010
Posts: 9
Hi all,

I m forwording from action class and in the url i m getting ActionClass Name like http://localhost:8080/Test/TestLogin.do

i want the in the URL the jsp name should be displayed is it possible in struts 1.3

like : http://localhost:8080/Test/HomePage.jsp

in the ActionClass i m returning ..............

return mapping.findForward("test");

in struts-config.xml

<forward name="test" path="/HomePage.jsp" />

Please suggest me



Rajkumar balakrishnan
Ranch Hand

Joined: May 29, 2008
Posts: 445

Change the mapping in web.xml from *.do to *.jsp. It'll do the trick.


Never try to be a hard-worker. Be a smart-worker.
My Blog
Ggaurav Gupta
Greenhorn

Joined: Mar 26, 2010
Posts: 9
Hello ,

I tried it after that i m getting Invalid path was requested. Not able to run my application. Everytime it is saying Invalid path was requested
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Do you want the entire app to look like you're hitting JSP pages, or do you just want that one page to be a JSP?
Rajkumar balakrishnan
Ranch Hand

Joined: May 29, 2008
Posts: 445

Ggaurav Gupta wrote:Hello ,

I tried it after that i m getting Invalid path was requested. Not able to run my application. Everytime it is saying Invalid path was requested


Stacktrace?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts Action Forword