• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to rewrite URL?

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 3852
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic