Re: Can't access session id
Tim, that's great. I now realise, following from your advice, the difference between JSTL Expression Language implicit variables and the JSP implicit objects. Thanks, Frank. Thanks, also, to Justin Ruthenbeck for the JSP expression script version. - Original Message - From: Tim Funk [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Thursday, March 04, 2004 1:12 AM Subject: Re: Can't access session id You need to use the pageContext implicit object. session id = c:out value=${pageContext.request.session.id} / -Tim Frank Burns wrote: I need to access the session id from within a JSP and pass it, explicitly, to a Flash-based client. I am using the following code fragment as part of my JSP, but the value returned for the session id is always blank. Am I doing something wrong? [EMAIL PROTECTED] contentType=text/xml session=true % ?xml version=1.0 encoding=UTF-8? %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % myResponse sessionId session id = c:out value=${sessionScope.id} / /sessionId /myResponse - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Can't access session id
I need to access the session id from within a JSP and pass it, explicitly, to a Flash-based client. I am using the following code fragment as part of my JSP, but the value returned for the session id is always blank. Am I doing something wrong? [EMAIL PROTECTED] contentType=text/xml session=true % ?xml version=1.0 encoding=UTF-8? %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % myResponse sessionId session id = c:out value=${sessionScope.id} / /sessionId /myResponse - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Can't access session id
I think the out object is not referenced correctly. The out object writes into the output stream to the client, but this is a buffered version of the java.io.PrintWriter class and is of type javax.servlet.jsp.JspWriter. I believe the c:out is pointing to the wrong value or the sessionScope field is not correctly indexed. -Original Message- From: Frank Burns [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 5:07 PM To: Tomcat Users List Subject: Can't access session id I need to access the session id from within a JSP and pass it, explicitly, to a Flash-based client. I am using the following code fragment as part of my JSP, but the value returned for the session id is always blank. Am I doing something wrong? [EMAIL PROTECTED] contentType=text/xml session=true % ?xml version=1.0 encoding=UTF-8? %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % myResponse sessionId session id = c:out value=${sessionScope.id} / /sessionId /myResponse - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't access session id
So what is the best way to access the session id? - Original Message - From: Ed Bicker [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 10:25 PM Subject: RE: Can't access session id I think the out object is not referenced correctly. The out object writes into the output stream to the client, but this is a buffered version of the java.io.PrintWriter class and is of type javax.servlet.jsp.JspWriter. I believe the c:out is pointing to the wrong value or the sessionScope field is not correctly indexed. -Original Message- From: Frank Burns [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 5:07 PM To: Tomcat Users List Subject: Can't access session id I need to access the session id from within a JSP and pass it, explicitly, to a Flash-based client. I am using the following code fragment as part of my JSP, but the value returned for the session id is always blank. Am I doing something wrong? [EMAIL PROTECTED] contentType=text/xml session=true % ?xml version=1.0 encoding=UTF-8? %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % myResponse sessionId session id = c:out value=${sessionScope.id} / /sessionId /myResponse - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't access session id
- Start jsp source - The sessionId is: %session.getSessionId() %. - END jsp source - I'm sure you can do it with tablibs as well, but I don't use 'em, so I'm not the one to ask. justin At 03:06 PM 3/3/2004, you wrote: So what is the best way to access the session id? - Original Message - From: Ed Bicker [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 10:25 PM Subject: RE: Can't access session id I think the out object is not referenced correctly. The out object writes into the output stream to the client, but this is a buffered version of the java.io.PrintWriter class and is of type javax.servlet.jsp.JspWriter. I believe the c:out is pointing to the wrong value or the sessionScope field is not correctly indexed. -Original Message- From: Frank Burns [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 03, 2004 5:07 PM To: Tomcat Users List Subject: Can't access session id I need to access the session id from within a JSP and pass it, explicitly, to a Flash-based client. I am using the following code fragment as part of my JSP, but the value returned for the session id is always blank. Am I doing something wrong? [EMAIL PROTECTED] contentType=text/xml session=true % ?xml version=1.0 encoding=UTF-8? %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % myResponse sessionId session id = c:out value=${sessionScope.id} / /sessionId /myResponse - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Justin Ruthenbeck Software Engineer, NextEngine Inc. justinr - AT - nextengine DOT com Confidential. See: http://www.nextengine.com/confidentiality.php __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Can't access session id
You need to use the pageContext implicit object. session id = c:out value=${pageContext.request.session.id} / -Tim Frank Burns wrote: I need to access the session id from within a JSP and pass it, explicitly, to a Flash-based client. I am using the following code fragment as part of my JSP, but the value returned for the session id is always blank. Am I doing something wrong? [EMAIL PROTECTED] contentType=text/xml session=true % ?xml version=1.0 encoding=UTF-8? %@ taglib prefix=c uri=http://java.sun.com/jstl/core; % myResponse sessionId session id = c:out value=${sessionScope.id} / /sessionId /myResponse - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]