ally
reused for requests to many different Contexts.
>
>
>
> Caldarale, Charles R wrote:
>>
>>> From: lightbulb432 [mailto:[EMAIL PROTECTED]
>>> Subject: HttpSession questions
>>>
>>> Why is it that you need an HttpSession in order to get a
&g
> From: lightbulb432 [mailto:[EMAIL PROTECTED]
> Subject: RE: HttpSession questions
>
> If however, I were to change my code and pass the return
> value of Servlet's getServletContext() to my class, would
> a session still be created
No, no session is created.
> Out
rote:
>
>> From: lightbulb432 [mailto:[EMAIL PROTECTED]
>> Subject: HttpSession questions
>>
>> Why is it that you need an HttpSession in order to get a
>> ServletContext?
>
> You don't - since your code is in a class that extends HttpServlet, ju
It's also available via the servlet class. See
http://tomcat.apache.org/tomcat-5.5-doc/servletapi/javax/servlet/GenericServlet.html#getServletContext()
If you are trying this via jsp, it should be available via PageContext. See
http://tomcat.apache.org/tomcat-5.5-doc/jspapi/javax/servlet/jsp/
> From: lightbulb432 [mailto:[EMAIL PROTECTED]
> Subject: HttpSession questions
>
> Why is it that you need an HttpSession in order to get a
> ServletContext?
You don't - since your code is in a class that extends HttpServlet, just
call getServletContext() directly
ge in context:
http://www.nabble.com/HttpSession-questions-tf4008885.html#a11385003
Sent from the Tomcat - User mailing list archive at Nabble.com.
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [