• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tweak a url

 
Andy Hahn
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to tweak a url from within a jsp? My goal is to create a custom URL to display to the user. I didn't see any methods on the HttpServletResponse to do this. I think it is kindof what a servlet filter would do but I am not sure. Thanks!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess that depends upon what you mean by "tweak a URL"?
 
Andy Hahn
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By tweak I mean modify, such as append ?id=123 onto the end of the url that will be displayed.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's very common to build URLs up from strings within code.
Changing one would depend on where it's coming from.
Can you give us a specific example of what you want to do?
 
Andy Hahn
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ben, I wanted to actually avoid the seeing just action.do in my struts url. I wanted to instead display the parameters as well. I ended up solving this by changing my form action to get instead of post. I can now reshape the urls using the url rewrite filter library.
Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic