hmm, looking at it more closely, your arguments sound convincing. Right off
my head I cannot come up with a refutation..
have a nice day, too
-----Original Message-----
From: Magnus Stenman <[EMAIL PROTECTED]>
To: Christian Sell <[EMAIL PROTECTED]>;
[EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Mittwoch, 19. Juli 2000 14:34
Subject: Re: sendRedirect in orion and jrun
>Hm, interesting, compability is a reason for us promoting the relative way
>too, can you explain/elaborate?
>Technically if you have a 2.1 or below app it's "always bound to root" so
>you'd have for instance
>redirect("/thepage.jsp"). Now, with 2.2 this becomes a web-app, now you
bind
>it to /theapp - what do you want to happen?
>A small note: Relative paths werent allowed at all in 2.1 and before really
>but a lot of servers broke that spec (explicit spec) and passed it thru
>anyways so there might be apps out there using it. Can you explain how
>redirect(request.getContextPath() + "/thepage.jsp") would be "friendlier"
to
>2.1? As for servers acting the same we definitely agree, but the servlet
>spec is to live for a long while (or so we hope at least) so consistency is
>important too.
>
>Any input is appreciated, have a nice day!
>
>/Magnus Stenman, the Orion team
>
>
>----- Original Message -----
>From: "Christian Sell" <[EMAIL PROTECTED]>
>To: "Orion-Interest" <[EMAIL PROTECTED]>
>Cc: <[EMAIL PROTECTED]>
>Sent: Wednesday, July 19, 2000 11:13 AM
>Subject: Re: sendRedirect in orion and jrun
>
>
>> 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).
>> >>
>> >
>>
>