Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes about getRequestDispatcher() ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "about getRequestDispatcher() ?" Watch "about getRequestDispatcher() ?" New topic
Author

about getRequestDispatcher() ?

hasan khan
Ranch Hand

Joined: Aug 04, 2003
Posts: 222

i want to know that the String passed as parameter to getRequestDispatcher() shoude be encoded or not by using response.encodeURL();
AmitKumar Jain
Ranch Hand

Joined: Jun 13, 2005
Posts: 95
It will depend whether you want to implement session handling through URL Rewriting or not.


SCJP 1.4 : 91%
SCWCD 1.4 : 95%
SCBCD 1.3 : 95%
SCJP 6 Upgrade : 95%
Next SCBCD 1.5
Man is not finished when he is defeated. He is finished when he quits.
hasan khan
Ranch Hand

Joined: Aug 04, 2003
Posts: 222

i am using HttpSession for session tracking, and i am using response.encodeURL() for all links in jsp pages and in all forward & include in all servlets.

and i just to confirm that is it really require to encode a URL before passing it to requestdispatcher
Wayan Suwastika
Greenhorn

Joined: May 25, 2005
Posts: 11
Yes, U must use response.encodeURL() (URL re-writing) for all URL to ensure your session tracking also work well for client browser that doesn't accept cookie.

-wyasa-


SCJA, SCJP 1.4, SCWCD inprogress
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: about getRequestDispatcher() ?