Re: how to customize HTTPSession

2003-11-25 Thread ppalavilli
thanks for the good suggestion Chris - that is what exactly I am looking for. I tried it and got part that involves reading the cookie from the Request and setting a request object (easy part though). I seem to have problems implementing the HttpServletResponseWrapper to collect the response

RE: how to customize HTTPSession

2003-11-24 Thread Shapira, Yoav
To: Tomcat Users List Subject: Re: how to customize HTTPSession Tim, With the functionality you desire, stay away from the Session classes as defined in the servlet API. I completely agree. Instead, look into Filters and HttpServletRequestWrapper and HttpServletResponse wrapper. Ideally, you'd

Re: how to customize HTTPSession

2003-11-24 Thread Antonio Fiol BonnĂ­n
Please remember that you can only add cookies to the response BEFORE committing the response. That means, if you do write a (big) part of the result and Tomcat starts sending it to the browser, you will not be able to set any more cookies (or will not be sent to the browser anyway). Yours,

how to customize HTTPSession

2003-11-23 Thread ppalavilli
Hi, I am new to the java webapp development. I want to store some user data for my app in a client side cookie rather than as a server side object and referencing it with a sessionId. One of the main reasons for that is - we will be running multiple servers load balancing. Since the

Re: how to customize HTTPSession

2003-11-23 Thread Mark R. Diggory
You might look into implementing the javax.servlet.hhtp.HttpSessionBindingListener interface, this will allow you to act when an object is added/removed from the session. Simply put, you could write valueBound/UnBound methods that set Cookies into the HttpResponse. -Mark [EMAIL PROTECTED]

Re: how to customize HTTPSession

2003-11-23 Thread ppalavilli
Thanks Mark - the problem with using HTTPSessionBindingListener is that the unbound event is not triggered unless someone calls the session.removeAttribute() or session.setAttribute(name, null). So there is no way for me to set the cookie from the unbound() event without explicitly calling one

Re: how to customize HTTPSession

2003-11-23 Thread Tim Funk
With the functionality you desire, stay away from the Session classes as defined in the servlet API. Any developer will be greatly confused if they try to read your code created by your description below since you are mixing well known terminology and assumptions. Instead, look into Filters

Re: how to customize HTTPSession

2003-11-23 Thread Christopher Schultz
Tim, With the functionality you desire, stay away from the Session classes as defined in the servlet API. I completely agree. Instead, look into Filters and HttpServletRequestWrapper and HttpServletResponse wrapper. Ideally, you'd create some helper classes which do the gets and sets on the