• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cleaning up the tokenised URLs

 
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

I'm using Struts Tokens to protect the system from duplicate submits. Some of the URLs are being generated using <html: link> tags. These generated URLs are having org.apache.struts.TOKEN kind of field.

Is there a way to cleanup these URLs? I need to remove atleast the org.apache.. part of the token. It looks very weird to the end users.

Please share your views on this.

Thanks and regards,
Kinjal Sonpal
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A regular link does a GET request. If you are to include a token, it must be in the URL.

If you can find a way to make the links "POST"... submit a fake form or something... then I'm sure that could keep users from seeing the hideous token in the Address bar.
 
Kinjal Sonpal
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Marc,

Thanks for the tip. I was also thinking on similar lines, but I thought just in case anyone has some other way of doing things.

I'm planning to use a simple JavaScript that will make a POST request to the server. Are there any other (Non-JavaScript) ways?

Thanks and regards,
Kinjal Sonpal
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic