aspose file tools*
The moose likes JSP and the fly likes Rewriting URL in jstl Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Rewriting URL in jstl " Watch "Rewriting URL in jstl " New topic
Author

Rewriting URL in jstl

Jyoti Aggarwal
Ranch Hand

Joined: May 26, 2009
Posts: 33
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

Joined: Jan 10, 2002
Posts: 61657
    
  67

Why?

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

Otherwise, you'll need to post it from a form.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jyoti Aggarwal
Ranch Hand

Joined: May 26, 2009
Posts: 33
Why not bother??
If its username and password how will it not matter?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61657
    
  67

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

Joined: May 26, 2009
Posts: 33
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

Joined: Jan 10, 2002
Posts: 61657
    
  67

If you are not typing in the URL by hand, why should the number of params be a problem?
Jyoti Aggarwal
Ranch Hand

Joined: May 26, 2009
Posts: 33
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

Joined: Dec 16, 2010
Posts: 1043
    
  13

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


"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1018
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
Bartender

Joined: Oct 14, 2005
Posts: 18909
    
    8

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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Rewriting URL in jstl