File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes URL Parameters Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSP
Reply Bookmark "URL Parameters" Watch "URL Parameters" New topic
Author

URL Parameters

sk mehrotra
Ranch Hand

Joined: Oct 27, 2005
Posts: 34
Dear All,
1. I am using an application to send a URL with parameters to a JSP page.
Eg: http://localhost/test.jsp?user=abc&det=rrrr
I'll like to hide the information posted through the Parameters. These Parameters are not submitted from a Html/Jsp.

Secondly would like to know how can we expire the page if the URL is tempered?

Thanks
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6321

You can use request attributes to pass data to the JSP.

Secondly would like to know how can we expire the page if the URL is tempered?


How to terminate the session if the URL is tampered with ?


SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
sk mehrotra
Ranch Hand

Joined: Oct 27, 2005
Posts: 34
1. I am not passing parameters through a JSP/Servlet. I am calling web tool of the application to set a URL with parameters, i.e : http://localhost/test.jsp?user=abc&det=rrrr.
In this case if user can copy the URL and modify some parameters and it can be used again with the changed parameters. If I would have been sending the parameters through Html/Jsp page then can use the POST method.

How to terminate the session if the URL is tampered with ?
Prashant Hurria
Ranch Hand

Joined: Mar 23, 2009
Posts: 37
I don't think there is a Straight forward way to expire the session when the the user fiddles with the URL parameters.
The One possible trick can be Encrypt the Parameter with some Private key and send the Encrypted Parameter.Decrypt the same in your Application.Assuming the Web tool is secured enough to have the Private key.This approach does have flaws but you can always experiment . Surley this will not expire the session you can also use Hashing and some other Cryptographic technique..... Explore.
 
 
subject: URL Parameters
 
MyEclipse, The Clear Choice