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


JavaRanch » Java Forums » Java » JSP
Reply Bookmark "URL rewriting" Watch "URL rewriting" New topic
Author

URL rewriting

Sony Agrawal
Ranch Hand

Joined: Oct 04, 2009
Posts: 143
How is URLRewriting done in JSP page without using JSTL.
Is it possible ?
Devaka Cooray
Saloon Keeper

Joined: Jul 29, 2008
Posts: 2586

Sony Agrawal wrote:...without using JSTL.

Why not using JSTL ?


Author of ExamLab - the free mock exam kit for SCJP / OCPJP
Home Page -- Twitter Profile -- JavaRanch FAQ -- How to Ask a Question
Sony Agrawal
Ranch Hand

Joined: Oct 04, 2009
Posts: 143
JSP was there before JSTL ( I guess).
So there must be a way to do it without JSTL . Curious to know about it.
Devaka Cooray
Saloon Keeper

Joined: Jul 29, 2008
Posts: 2586

There is no action tag for encoding the URL for rewriting.
You may use another component to encode the URL, and pass the encoded URL to the JSP as an attribute, or, use JSTL.
Kris Schneider
Ranch Hand

Joined: Feb 14, 2001
Posts: 71
One way is to use an expression: <%= response.encodeURL("url/to/encode") %>
 
 
subject: URL rewriting
 
MyEclipse, The Clear Choice