• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to rewrite URL?  RSS feed

 
Venki Ananth
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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" ?
 
Venki Ananth
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!