This week's book giveaways are in the JBoss and Spring forums.
We're giving away four copies each of JBoss AS 5 Development and Spring Dynamic Modules in Action and have the authors on-line!
See this thread and this one for details.
[Logo] JavaRanch » JavaRanch Saloon
  Search | FAQ | Recent Topics | Hot Topics
Register / Login


Win a copy of JBoss AS 5 Development this week in the JBoss forum
or Spring Dynamic Modules in Action in the Spring forum!
Reply Bookmark it! Watch this topic JavaRanch » Forums » Java » JSP
 
RSS feed
 
New topic
Author

How to rewrite URL?

Venki Ananth
Greenhorn

Joined: Dec 17, 2008
Messages: 29

Hello All,

I developed a webapplication and it is running properly. But in most of the places i used reference link like "http://host:portnumber/project/some.jsp?employee_id=123" so an end user can trace my parameter(employee_id).

But i would like to show my url without any parameter like "http://host:portnumber/project/some.jsp" in the same time i should get parameters also.

My Jsp Code:


Is there any simple way to rewrite my url?

Learner!
Venki
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Messages: 3718

Venki Ananth wrote:Hello All,

I developed a webapplication and it is running properly. But in most of the places i used reference link like "http://host:portnumber/project/some.jsp?employee_id=123" so an end user can trace my parameter(employee_id).

But i would like to show my url without any parameter like "http://host:portnumber/project/some.jsp" in the same time i should get parameters also.

My Jsp Code:


Is there any simple way to rewrite my url?


Why are you hardcoding employee_id as 123?
You can use a form and 'post' method in form to avoid form parameters in URL.
Venki Ananth
Greenhorn

Joined: Dec 17, 2008
Messages: 29

Hi ankur,

Thanks! I can not use forms in my pages and also i dont want to use post method . User should click only on "hyper links" and next page should load according to the parameters.

Any ways to "rewrite URL" ?

This message was edited 1 time. Last update was at by Venki Ananth


Learner!
Venki
Venki Ananth
Greenhorn

Joined: Dec 17, 2008
Messages: 29

Hi all.
I found a solution . I used form.submit() script and sending hidden parameters to next page. Fine now its not visibile with url.

Thanks to all.

Learner!
Venki
 
jQuery in Action
 
 
Reply Bookmark it! Watch this topic JavaRanch » Forums » Java » JSP
 
RSS feed
 
New topic
MyEclipse Enterprise Workbench