aspose file tools
The moose likes JSP and the fly likes Rewriting URL in jstl Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply 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: 56192
    
  13

Why?

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

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


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About 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: 56192
    
  13

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: 56192
    
  13

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
Ranch Hand

Joined: Dec 16, 2010
Posts: 383
    
    3

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


"I have a mind like a steel... uh... thingy."
Stefan Evans
Bartender

Joined: Jul 06, 2005
Posts: 1005
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: 16483
    
    2

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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Rewriting URL in jstl
 
Similar Threads
/admin not accessible in tomcat 5.5
HTTP Status 404
Servlets with Tomcat 4
tomcat 7 encounters LifecycleException caused by java.lang.UnsupportedClassVersionError
How to set conf file file