aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes About URL Rewriting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "About URL Rewriting" Watch "About URL Rewriting" New topic
Author

About URL Rewriting

Sony Agrawal
Ranch Hand

Joined: Oct 04, 2009
Posts: 143
How is urlRewriting done?
I tried it, i had to do the following statements..
1. res.encodeURL("encodedURL.jsp");
2.res.sendRedirect("encodedURL.jsp");

So i am assuming that in one statement i have to call the encodeURL method and from then on if i used the senRedirect() the encoded URL will be used(given that cookies are
disabled).

Correct me if i am wrong
Minhaj Mehmood
Ranch Hand

Joined: Jan 22, 2007
Posts: 400

try something like



SCJP6 96% | SCWCD5 81% | SCDJWS5 79%
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
Check the API, you'll find out that this method returns a String with the encoded URL, or the String as it came in if session tracking is enabled.


JDBCSupport - An easy to use, light-weight JDBC framework -
Sony Agrawal
Ranch Hand

Joined: Oct 04, 2009
Posts: 143
Actually i wrote it in two different statement.

one that just encodes and the other just redirects......
It would not have confused me if it was like


gandhi nagaraj
Greenhorn

Joined: Dec 14, 2009
Posts: 1
I think you can use like this response.encodeRedirectURL("encodedURL.jsp");

Many Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: About URL Rewriting