Howdy, Also, Servlet 2.4 adds the HttpRequestListener which you can implement: use tomcat 5. This may be perfect for your needs.
Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: Christopher Schultz [mailto:[EMAIL PROTECTED] >Sent: Sunday, November 23, 2003 10:32 PM >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 create some helper classes which do the gets and sets on >> the servletrequests and responses. How they get instantiated is up to >you. > >Yeah, the filter is the way to go. A Filter gets to execute both before >and after your "application" code handles the request. > >You can do some clever things like gather all the cookies from a request >that match a certain pattern (regexp), convert them to objects, and >shove them into request attribute (or perhaps a Map of name->value, with >the whole map in the request). Then, have your app code handle the request. > >After your app code executes, look for an attribute in the request >(since response objects, unfortunately for your, can't have attributes) >that should be converted back into cookies. > >Let me know if you need some sample code. This seems interesting enough >that I'd be willing to bang some simple stuff out for you :) > >-chris > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]