• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

url rewriting with struts

 
Andy Hahn
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Andy Hahn
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic