aspose file tools*
The moose likes Struts and the fly likes url rewriting with struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "url rewriting with struts" Watch "url rewriting with struts" New topic
Author

url rewriting with struts

Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
Hi,
Can you please help me understand how to use url-rewriting with struts? I would like (if possible) to perform url parameter getting and setting in my action class versus in the jsp. I am trying to use account for sessions when the client browser has cookies disabled. Sample code is appreciated!

Thanks!
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
Struts automatically performs URL rewriting. If you use struts tags for all your links and <html:form> instead of <form>, you don't have to worry about URL rewriting at all, because Struts does it for you.

It's important to understand, though, that using URL rewriting to keep track of the HttpSession is a setting that is made in the Application Server. Consult your app server's documentation for information on how to turn this function on.


Merrill
Consultant, Sima Solutions
Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
I am using Tomcat 5.0.28. Struts is not adding a url parameter of any kind. I am returning an ActionForward from the action class and all JSPs use <html:form>. But say I wanted to add my own custom parameters, how would I do that?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: url rewriting with struts