Hi,

Check the javadocs:

http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/http/HttpServletRequest.html#getSession()

Returns the current session associated with this request, or if the
request does not have a session, creates one.

If you don't want a session call getSession(false) or don't call the
method at all. As far as I know the webapp will be sessionless as long
as you don't call getSession() on request object and put
session="false" in all your jsps (otherwise in the generated java
servlet HttpSession session = request.getSession(); will be called).
Thanks I was looking for doing the JSP <%@ page session="true" %> equivalent .. but in servlet


Another question, what's your goal? Why do you need explicitely
sessionless servlets so badly? Isn't it sufficent just not to use the
session if you don't need it?
I want to use Tomcat to hold a reportServer. It will receive request from different users from different webApp to craft reports. It needs to be sessionless, in fact since I don't need session I just wanted to avoid a memory leak...

Thanks for your help
/David



regards
Leon

On 4/7/06, David Gagnon <[EMAIL PROTECTED]> wrote:
In fact I need to know How to have a sessionless Servlet?  I search the
tomcat source and it seems I have nothing to do.  But when I do a
request.getSession()  I do receive a session object?  Is that normal
behavior?

Thanks for your help
/David



Franck Borel wrote:

Use <%@ page session="false"> in your jsp sites.

-- Franck

Hi,

I need to have a sessionless tomcat.  I surely easy to do but I'm
searching without success for a while now.

I need a servlet without session.


Thanks for your help
Best regards
/David

---------------------------------------------------------------------
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]



---------------------------------------------------------------------
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]

Reply via email to