Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Rewriting URL in jstl

 
Jyoti Aggarwal
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In jstl http://localhost:8080/MMS_PricingPOC/employeeProcess.do?dispatch=getEmployees&employeeid=21
how can i hide dispatch and employeeid from being visible. The visible url should only be http://localhost:8080/MMS_PricingPOC/employeeProcess.do

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64983
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why?

If it's for "security", don't bother.

Otherwise, you'll need to post it from a form.
 
Jyoti Aggarwal
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not bother??
If its username and password how will it not matter?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64983
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because there is no security in simply not placing the info on the URL. It's just as easy to "steal" the info from a post. If you need data passed securely, it needs to be SLL-protected.
 
Jyoti Aggarwal
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. But one more thing I need to pass like odd 10 params.
URL is getting cumbersome how can I take care of the same??
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64983
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are not typing in the URL by hand, why should the number of params be a problem?
 
Jyoti Aggarwal
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been asked that params should not be visible in URL.
and I have done whole jsp in JSTL. I don know how to pass hidden variable as url is not redirected to the proper page.
Please help.
 
J. Kevin Robbins
Bartender
Pie
Posts: 1800
28
Chrome Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suspect that you are not understanding the difference between POST and GET. Try this link. http://www.w3answers.com/what-difference-between-get-and-post-methods-form-submitting-give-cases-where-we-can-use-get-and-pos
 
Stefan Evans
Bartender
Posts: 1755
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not having seen any code yet, its hard to judge, but I would guess you are using the JSTL <c:url> tag with <c:param> to build these links?
Using that approach it is impossible to avoid the parameters in the query string.

 
Paul Clapham
Sheriff
Posts: 21149
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jyoti Aggarwal wrote:I don know how to pass hidden variable as url is not redirected to the proper page.


Do you mean that you don't know how to create an HTML form with hidden parameters? Or have you not yet realized that you need a form using the POST method if you want to connect to a URL without using URL parameters?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic