IntelliJ Java IDE
The moose likes Struts and the fly likes Cleaning up the tokenised URLs Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Application Frameworks » Struts
Reply Bookmark "Cleaning up the tokenised URLs" Watch "Cleaning up the tokenised URLs" New topic
Author

Cleaning up the tokenised URLs

Kinjal Sonpal
Ranch Hand

Joined: Jun 06, 2003
Posts: 96
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
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4695

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.


A good workman is known by his tools.
Kinjal Sonpal
Ranch Hand

Joined: Jun 06, 2003
Posts: 96
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
 
 
subject: Cleaning up the tokenised URLs
 
Threads others viewed
$.getJSON() bugs in jQuery 1.2.2
window.location with servlet bean
special character for space in URL
Image problem with JSP
how to get current page's URL with "doPost" method ?
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com