>First let me start by saying that this is not a bug...nor a
>misinterpretation of the specs.

the specs are so unclear on this one that it is hard to misinterpret them
anyway. Magnus already conceded that the issue was officially still "up in
the air". But I agree (as I said previously) that context-relative makes the
most sense, for the very reasons that you cite. My current problem is how to
write server-portable code (and deployment descriptors!) which in the case
of sendRedirect leads me to having to use hard-coded absolute URLs, as you
describe.

>Servlets 2.2 specification introduces the
>concept of "web-app" contexts.

well, I guess that is not news anymore.. ;-)

>    String requestURL=HttpUtils.getRequestURL(request).toString();
>    String absolute=requestURL.substring(0,
>                requestURL.length()-request.getRequestURI().length());
>    response.sendRedirect(absolute+"/myothercontext/index.jsp");

thanks. I was just going to roll up my sleeves to write that one. Funny
though that I have to do this to redirect into my own context (due to server
incompatibility, not orions fault).


Reply via email to