Magnus Stenman wrote:
>
> Yesterday a user claimed a "bug" in our implementation, namely an
> IllegalArgumentException being thrown when attempting to do a
> sendRedirect() with a non-absolute URL. Our reply was that the spec
> clearly states that an IllegalArgumentException should be thrown in
> that case.  He then referred to other servlet engines, and more
> importantly; the reference implementations behavior (which allows
> this). Is it a bug in the reference implementation or
> an error in the spec? Any answers would be appreciated.

My suggestion is to take any relative URL given to sendRedirect() and
let the server convert to absolute.  That's friendly to the developer
and still sends an absolute URL to the client, which is what the spec
is trying to enforce.

-jh-

--
Jason Hunter
[EMAIL PROTECTED]
Book:    http://www.servlets.com/book
Article: http://www.javaworld.com/jw-12-1998/jw-12-servletapi.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

Reply via email to