If you are using the session tracking API, then encoding the URL will
take place when cookies aren't available...
This is what I have been led to believe.
-----Original Message-----
From: Andy Bailey [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 21, 1999 10:50 AM
To: [EMAIL PROTECTED]
Subject: AW: encodeRedirectUrl - how is it supposed to work?
Does anyone know _when_ it is supposed to do it.
That is, under what conditions the URL will be encoded (in whatever
format
the engine decides to use).
I'd like it if it were predictable.... :-)
Cheers
Geoff
Hi Geoff,
encodeUrl() and encodeRedirectUrl()
rewrite (encode) the URL string according to rules determined by the
web
server. All URLs that a servlet
produces should be run through these methods (encodeUrl() for normal
hrefs,
encodeRedirectUrl() for redirects).
Both methods return a String which is the encoded URL which you can
use as
and when you like.
Session ID's are included if session tracking is active, the method
for
setting the session id is determined
automatically meaning you need not worry about it at all. If session
tracking is not active for this servlet OR
not supported then you will get the same string back that you put in
(with
other parameters being correctly encoded
of course).
The upshot of this is that ALL urls your servlet(s) produce(s) should
be
passed through the appropriate method but
you retain control over when and how they are used.
Hope that helps.
Andy Bailey
PS A good reference book for Servlet programming is the O'Reilly tome
"Java
Servlet Programming".
There are one or two mistakes in it but on the whole is a very
worthwhile
investment.
_______________________________________________________________________
____
To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources:
http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html