Hi Angelov, Am Freitag, 20. Mai 2005 15:53 schrieb Angelov, Rossen: > Hi, > Does anybody know why Tomcat always redirects to absolute links? > > I looked at the implementation and the sendRedirect calls the > toAbsolute method which always constructs an absolute URL. > Is there any way to make Tomcat return relative URLs the way they > were requested for redirecting?
I would say that sendRedirect will set the HTTP header field "Location". According to the specification of the "Hypertext Transfer Protocol -- HTTP/1.1" / RFC 2616, this field requires an absolute URL: "The field value consists of a single absolute URI." -> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30 Best wishes Lutz --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]