Yes, that's the correct way to format a GET request URL. Why are you looking for another way? That one works perfectly well.
Joined: Jan 08, 2010
But the user doesn't want to see the parameters on the url. Can I hide it some for the user?
Mark E Hansen
Joined: Apr 01, 2009
What is the result of the user clicking on that link? Does it show the page with the date selection controls showing the desired values by default?
If so, then why not just have the page controller (servlet) that prepares that page assign the default values when the page is rendered?
For example, rather than having the link take the user to employee.jsp, have the link take the user to a servlet. Have the servlet determine what the default values should be (in the same way you determined them when you originally constructed the original link), then have the servlet set session attributes (or whatever you want) and forward to the employee.jsp page. The JSP page can now use those session attributes to assign the values to the date controls.
I'm just guessing. I'll bet the site owner doesn't want users to be able to "forcefully browse" the site and change the date parameters in the URL.
If there are things they aren't supposed to see on other pages, then you need some access control scheme. This is not achieved by hiding parameters.
If the site owner wants to to enforce some kind of sequential order to the way people are browsing, then have some session variables to show that the user is allowed to progress to such and such a date.
Like Tim is suggesting, You can use URL encryption technique for hiding parameters.
But below sentence is confusing me
They just want the url.
so I'm giving only the url by passing paramters to the query.
Does that mean you want to publish this URL to client? If so then in that case encryption or parameter hiding does not make sense.
But if URL is getting fired on some event then encryption can be used. This is what most of the internet banking sites use.
Mahesh Kedari - Fidus Technologies Ltd.
Joined: Jan 08, 2010
Can you please give me some examples? How would I enncrypt the url on jsp page?