Leon Rosenberg wrote:

Well, if you don't need the session just forget about it :-)
If you don't put anything into session and aren't using it in any
other way, why should there be a memory leak?
Maybe a misunderstanding from me but I tought Tomcat will keep session info on each connection for a given time (let say 15 minutes). So if 1000 uses ask for a report in 15 minute it's 1000 session object. But my numbers are too high anyway so probably this leak is not a problem .. if leak exists :-)

Regards
/David


regards
Leon


On 4/7/06, David Gagnon <[EMAIL PROTECTED]> wrote:
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]



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