A small implementation point that I've found useful:
Using the encodeUrl method can be a pain in the ass. As you know, all your
links must go through this method if you want to ensure state maintanence in
a cookie-hostile env (and you're not implementing your own method for
maintaining state).
In my design, all objects capable of rendering themselves to a client
implement a method:
void toHtml(HtmlWriter out);
HtmlWriter is an interface that pretty much mimics the java.io.Writer class
but has an additional method:
void writeUrl(String s);
this is used to write urls that (potentially) should be encoded.
I like this design because:
(1) it makes the code much cleaner
(2) it insulates you from a servlet implementation -- It was frustrating to
necessarily develop and debug under the servlet engine since I always needed
a HttpServletResponse object.
(3) it's extensible. My actual implemetation passes an alias to the actual
href which is looked up in a cache (hashtable) and then encoded.
Anyway, you still have to point all your links through writeUrl(String), but
it makes you much more deliberate about it and allows you to change things
'under the covers' much more easily.
happy coding,
paul
___________________________________________________________________________
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