RE: getRequestURI()

2002-07-11 Thread Ricky Leung

Yes, that is correct.  Though I am not familiar with how the other AS are
interpreting this, but when I use TC and encodeURL, I find that I have to
*not* put the hostname part in as the URL.

For example

myURL = "http://myserver.com/test.jsp";;
encodeURL(myURL);

this will not ever put the jsessionid to test.jsp, however.

myHostname = "http://myserver.com/";;
myURL = "test.jsp";
  //example only, mixed
html + java code

this works.  I have jsessionId appended when cookie is off on browser.


> -Original Message-
> From: Eddie Bush [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 11, 2002 1:29 AM
> To: Tomcat Users List
> Subject: Re: getRequestURI()
>
>
> I don't believe that's what I said at all =) What I was was that to the
> best of my recollection that's how it is supposed to act. Isn't
> encodeURL what you're supposed to be able to depend on when cookies are
> disabled? If it doesn't list the parameters/cookies in the url ... then
> what is it for? =) Ok - here I go digging through the docs *cringe*. Now
> ... you tell ME what the correct interpretation is:
>
>
>   encodeURL
>
> public java.lang.String *encodeURL*(java.lang.String url)
>
> Encodes the specified URL by including the session ID in it, or, if
> encoding is not needed, returns the URL unchanged. The
> implementation of this method includes the logic to determine
> whether the session ID needs to be encoded in the URL. For example,
> if the browser supports cookies, or session tracking is turned off,
> URL encoding is unnecessary.
>
> For robust session tracking, all URLs emitted by a servlet should be
> run through this method. Otherwise, URL rewriting cannot be used
> with browsers which do not support cookies.
>
>
> *Parameters:*
> |url| - the url to be encoded.*Returns:*
> the encoded URL if encoding is needed; the unchanged URL otherwise.
>
>
> That's off of Sun's JDK docs for J2EE 1.3. I think it danged well better
> have the session in it if cookies are off!
>
> I don't know why I was thinking attributes would be there ... the
> sessionid is really the only piece you need to track things you are
> persisting.
>
> Alex Kachanov wrote:
>
> >Wll Tomcat 4.0.x reference implementation returns:
> >
> >/index.jsp
> >
> >Then, that means all AS are wrong and just one Jrun is right?
> >
> >with best wishes
> >Alexander Kachanov
> >
> >-Original Message-
> >From: Eddie Bush [mailto:[EMAIL PROTECTED]]
> >Sent: 11 „y„„|„‘ 2002 „s. 11:59
> >To: Tomcat Users List
> >Subject: Re: getRequestURI()
> >
> >
> >I'd say the first one, but I'm not authoritative.  To the best of my
> >recollection, however, that is precisely what encodeURL is there for.
> > Hopefully someone else will have something additional to add.  I
> >_really_ think it should be the first (including the sessionid - and
> >other cookies/params too?).
> >
> >Regards,
> >
> >Eddie
> >
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: getRequestURI() final.

2002-07-11 Thread Alex Kachanov

I have tested it on tomcat 4.0.x (Resine, WebLogic, WebSphere) both with cookies turn 
of and on


both cases return /index.jsp (WITHOUT any jsessionid)


only on JRUN jsession is added to the name of the file


with best wishes
Alexander Kachanov

-Original Message-
From: Power-Netz (Schwarz) [mailto:[EMAIL PROTECTED]]
Sent: 11  2002 ?. 17:04
To: Tomcat Users List
Subject: AW: getRequestURI() final.


 
> JRun 3.1 and Jrun 4.0 are sure it should return
> /index.jsp;jsessionid=384975938475
> 
> 
> While all other Application servers return just:
> /index.jsp
>
> Who is right?

If you had tested it with cookies turned off , you had have this
result : "index.jsp;jsessionid=n2mcnodtnl" 
with cookies turned on , you just get "index.jsp".

-> TC 3.3.x Linux

cu

M.Schwarz


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: getRequestURI()

2002-07-10 Thread Ron Day

If cookies are turned on you WON'T see the sessioniD attached !!!
-Original Message-
From: Ron Day [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 12:36 AM
To: Tomcat Users List
Subject: RE: getRequestURI()


I haven't tried Tomcat recently, but we have developed a whole web site with
"Resin" using encodeURL, with cookies turned off.It works fine, and as
advertised.

Ron

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 12:29 AM
To: Tomcat Users List
Subject: Re: getRequestURI()


I don't believe that's what I said at all =) What I was was that to the
best of my recollection that's how it is supposed to act. Isn't
encodeURL what you're supposed to be able to depend on when cookies are
disabled? If it doesn't list the parameters/cookies in the url ... then
what is it for? =) Ok - here I go digging through the docs *cringe*. Now
... you tell ME what the correct interpretation is:


  encodeURL

public java.lang.String *encodeURL*(java.lang.String url)

Encodes the specified URL by including the session ID in it, or, if
encoding is not needed, returns the URL unchanged. The
implementation of this method includes the logic to determine
whether the session ID needs to be encoded in the URL. For example,
if the browser supports cookies, or session tracking is turned off,
URL encoding is unnecessary.

For robust session tracking, all URLs emitted by a servlet should be
run through this method. Otherwise, URL rewriting cannot be used
with browsers which do not support cookies.


*Parameters:*
|url| - the url to be encoded.*Returns:*
the encoded URL if encoding is needed; the unchanged URL otherwise.


That's off of Sun's JDK docs for J2EE 1.3. I think it danged well better
have the session in it if cookies are off!

I don't know why I was thinking attributes would be there ... the
sessionid is really the only piece you need to track things you are
persisting.

Alex Kachanov wrote:

>Wll Tomcat 4.0.x reference implementation returns:
>
>/index.jsp
>
>Then, that means all AS are wrong and just one Jrun is right?
>
>with best wishes
>Alexander Kachanov
>
>-Original Message-
>From: Eddie Bush [mailto:[EMAIL PROTECTED]]
>Sent: 11 „y„„|„‘ 2002 „s. 11:59
>To: Tomcat Users List
>Subject: Re: getRequestURI()
>
>
>I'd say the first one, but I'm not authoritative.  To the best of my
>recollection, however, that is precisely what encodeURL is there for.
> Hopefully someone else will have something additional to add.  I
>_really_ think it should be the first (including the sessionid - and
>other cookies/params too?).
>
>Regards,
>
>Eddie
>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>






--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: getRequestURI()

2002-07-10 Thread Alex Kachanov

forget "encodeURL" for a while.
I used it to show the example.


take this page:


<%@ page contentType="text/html;charset=Shift_JIS"%>
<%@page session="true"%>

<%= request.getRequestURI() %>

<%= session.getId() %>


tell me what request.getRequestURI() will return if the request is:

http://localhost/index.jsp;jsessionid=347957394?blah=889&bloh=56845


and do not mix URL and URI.




with best wishes
Alexander Kachanov

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: 11 „y„„|„‘ 2002 „s. 14:29
To: Tomcat Users List
Subject: Re: getRequestURI()


I don't believe that's what I said at all =) What I was was that to the
best of my recollection that's how it is supposed to act. Isn't
encodeURL what you're supposed to be able to depend on when cookies are
disabled? If it doesn't list the parameters/cookies in the url ... then
what is it for? =) Ok - here I go digging through the docs *cringe*. Now
... you tell ME what the correct interpretation is:


  encodeURL

public java.lang.String *encodeURL*(java.lang.String url)

Encodes the specified URL by including the session ID in it, or, if
encoding is not needed, returns the URL unchanged. The
implementation of this method includes the logic to determine
whether the session ID needs to be encoded in the URL. For example,
if the browser supports cookies, or session tracking is turned off,
URL encoding is unnecessary.

For robust session tracking, all URLs emitted by a servlet should be
run through this method. Otherwise, URL rewriting cannot be used
with browsers which do not support cookies.


*Parameters:*
|url| - the url to be encoded.*Returns:*
the encoded URL if encoding is needed; the unchanged URL otherwise.


That's off of Sun's JDK docs for J2EE 1.3. I think it danged well better
have the session in it if cookies are off!

I don't know why I was thinking attributes would be there ... the
sessionid is really the only piece you need to track things you are
persisting.

Alex Kachanov wrote:

>Wll Tomcat 4.0.x reference implementation returns:
>
>/index.jsp
>
>Then, that means all AS are wrong and just one Jrun is right?
>
>with best wishes
>Alexander Kachanov
>
>-Original Message-----
>From: Eddie Bush [mailto:[EMAIL PROTECTED]]
>Sent: 11 „y„„|„‘ 2002 „s. 11:59
>To: Tomcat Users List
>Subject: Re: getRequestURI()
>
>
>I'd say the first one, but I'm not authoritative.  To the best of my 
>recollection, however, that is precisely what encodeURL is there for. 
> Hopefully someone else will have something additional to add.  I 
>_really_ think it should be the first (including the sessionid - and 
>other cookies/params too?).
>
>Regards,
>
>Eddie
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: getRequestURI()

2002-07-10 Thread Ron Day

I haven't tried Tomcat recently, but we have developed a whole web site with
"Resin" using encodeURL, with cookies turned off.It works fine, and as
advertised.

Ron

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 11, 2002 12:29 AM
To: Tomcat Users List
Subject: Re: getRequestURI()


I don't believe that's what I said at all =) What I was was that to the
best of my recollection that's how it is supposed to act. Isn't
encodeURL what you're supposed to be able to depend on when cookies are
disabled? If it doesn't list the parameters/cookies in the url ... then
what is it for? =) Ok - here I go digging through the docs *cringe*. Now
... you tell ME what the correct interpretation is:


  encodeURL

public java.lang.String *encodeURL*(java.lang.String url)

Encodes the specified URL by including the session ID in it, or, if
encoding is not needed, returns the URL unchanged. The
implementation of this method includes the logic to determine
whether the session ID needs to be encoded in the URL. For example,
if the browser supports cookies, or session tracking is turned off,
URL encoding is unnecessary.

For robust session tracking, all URLs emitted by a servlet should be
run through this method. Otherwise, URL rewriting cannot be used
with browsers which do not support cookies.


*Parameters:*
|url| - the url to be encoded.*Returns:*
the encoded URL if encoding is needed; the unchanged URL otherwise.


That's off of Sun's JDK docs for J2EE 1.3. I think it danged well better
have the session in it if cookies are off!

I don't know why I was thinking attributes would be there ... the
sessionid is really the only piece you need to track things you are
persisting.

Alex Kachanov wrote:

>Wll Tomcat 4.0.x reference implementation returns:
>
>/index.jsp
>
>Then, that means all AS are wrong and just one Jrun is right?
>
>with best wishes
>Alexander Kachanov
>
>-Original Message-
>From: Eddie Bush [mailto:[EMAIL PROTECTED]]
>Sent: 11 „y„„|„‘ 2002 „s. 11:59
>To: Tomcat Users List
>Subject: Re: getRequestURI()
>
>
>I'd say the first one, but I'm not authoritative.  To the best of my
>recollection, however, that is precisely what encodeURL is there for.
> Hopefully someone else will have something additional to add.  I
>_really_ think it should be the first (including the sessionid - and
>other cookies/params too?).
>
>Regards,
>
>Eddie
>



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>






--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: getRequestURI()

2002-07-10 Thread Eddie Bush

I don't believe that's what I said at all =) What I was was that to the
best of my recollection that's how it is supposed to act. Isn't
encodeURL what you're supposed to be able to depend on when cookies are
disabled? If it doesn't list the parameters/cookies in the url ... then
what is it for? =) Ok - here I go digging through the docs *cringe*. Now
... you tell ME what the correct interpretation is:


  encodeURL

public java.lang.String *encodeURL*(java.lang.String url)

Encodes the specified URL by including the session ID in it, or, if
encoding is not needed, returns the URL unchanged. The
implementation of this method includes the logic to determine
whether the session ID needs to be encoded in the URL. For example,
if the browser supports cookies, or session tracking is turned off,
URL encoding is unnecessary.

For robust session tracking, all URLs emitted by a servlet should be
run through this method. Otherwise, URL rewriting cannot be used
with browsers which do not support cookies.


*Parameters:*
|url| - the url to be encoded.*Returns:*
the encoded URL if encoding is needed; the unchanged URL otherwise.


That's off of Sun's JDK docs for J2EE 1.3. I think it danged well better
have the session in it if cookies are off!

I don't know why I was thinking attributes would be there ... the
sessionid is really the only piece you need to track things you are
persisting.

Alex Kachanov wrote:

>Wll Tomcat 4.0.x reference implementation returns:
>
>/index.jsp
>
>Then, that means all AS are wrong and just one Jrun is right?
>
>with best wishes
>Alexander Kachanov
>
>-Original Message-
>From: Eddie Bush [mailto:[EMAIL PROTECTED]]
>Sent: 11 „y„„|„‘ 2002 „s. 11:59
>To: Tomcat Users List
>Subject: Re: getRequestURI()
>
>
>I'd say the first one, but I'm not authoritative.  To the best of my 
>recollection, however, that is precisely what encodeURL is there for. 
> Hopefully someone else will have something additional to add.  I 
>_really_ think it should be the first (including the sessionid - and 
>other cookies/params too?).
>
>Regards,
>
>Eddie
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: getRequestURI()

2002-07-10 Thread Alex Kachanov

Wll Tomcat 4.0.x reference implementation returns:

/index.jsp


Then, that means all AS are wrong and just one Jrun is right?



with best wishes
Alexander Kachanov

-Original Message-
From: Eddie Bush [mailto:[EMAIL PROTECTED]]
Sent: 11 „y„„|„‘ 2002 „s. 11:59
To: Tomcat Users List
Subject: Re: getRequestURI()


I'd say the first one, but I'm not authoritative.  To the best of my 
recollection, however, that is precisely what encodeURL is there for. 
 Hopefully someone else will have something additional to add.  I 
_really_ think it should be the first (including the sessionid - and 
other cookies/params too?).

Regards,

Eddie

Alex Kachanov wrote:

>Hello!
>
>
>This is a page:
>
><%@ page contentType="text/html;charset=Shift_JIS"%>
><%@page session="true"%>
>
>">Check this
>
><%= request.getRequestURI() %>
>
><%= session.getId() %>
>
>
>So, guys, what do you think "request.getRequestURI()" method should return
>when cookies are switched of in browser and you clikc on "Check this" link?
>
>
>JRun 3.1 and Jrun 4.0 are sure it should return
>/index.jsp;jsessionid=384975938475
>
>
>While all other Application servers return just:
>/index.jsp
>
>
>
>Who is right?
>
>
>with best wishes
>Alexander Kachanov
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: getRequestURI()

2002-07-10 Thread Eddie Bush

I'd say the first one, but I'm not authoritative.  To the best of my 
recollection, however, that is precisely what encodeURL is there for. 
 Hopefully someone else will have something additional to add.  I 
_really_ think it should be the first (including the sessionid - and 
other cookies/params too?).

Regards,

Eddie

Alex Kachanov wrote:

>Hello!
>
>
>This is a page:
>
><%@ page contentType="text/html;charset=Shift_JIS"%>
><%@page session="true"%>
>
>">Check this
>
><%= request.getRequestURI() %>
>
><%= session.getId() %>
>
>
>So, guys, what do you think "request.getRequestURI()" method should return
>when cookies are switched of in browser and you clikc on "Check this" link?
>
>
>JRun 3.1 and Jrun 4.0 are sure it should return
>/index.jsp;jsessionid=384975938475
>
>
>While all other Application servers return just:
>/index.jsp
>
>
>
>Who is right?
>
>
>with best wishes
>Alexander Kachanov
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>




--
To unsubscribe, e-mail:   
For additional commands, e-mail: