This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts url

 
FY Hsieh
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When user uses url to access my action like /mpapp/getOrderAction?custId=john123&date=...
they can see the order page.

How can I hide their input parameter information in URL but still process the order and show them the order JSP page ? with this said, they can use the above URL containing those id parameters to access my action, but when page returns, the URL does not contain any of those parameters, so another person won't be able to see it on url. How to do that ?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a POST request?
 
FY Hsieh
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave, not sure if you got me correctly. I still would like to allow user to use URL like

http://mpapp/getOrderAction?param1=..¶m2=...

I want to execute the method and return the order results and at same time and on the *same brower window*, somehow alter the URL without showing the parameter values. I think struts uses POST behind the scene, right ? So could you give more details on what you suggested ?

Thank You.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Struts action doesn't care about how the request is made. If you want to redirect *after* a GET request, then do so, but you'll have to store the values somewhere like session.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic