hello,

I have one last comment regarding the sendRedirect issue:

In fact, I tend to changing my mind on this one. The behavior of JRun &
Tomcat, even though it is out of line with many other API methods which take
paths starting with "/" as context-relative, doea make sense because it
keeps upward compatibility for pre-servlet-2.2 apps. And thats an important
issue, too. As well as that all servers behave equally...

regards,

>Subject: Re: sendRedirect in orion and jrun
>
>
>> >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