HttpSession expires after the timeout period you set in your servlet conatiner. for example if a user is shopping and leave its PC to go for a walk , when he comes back the session will likely expires. A cookie on the other end can be set to expire later or never, or always. when you track user access, you will have to differentiate both, depends on what you want to achieve.
You can set a specific cookie for the trackingn purpose and use apache log format to log it. then use normal weblog analyser. Have a look there for more info: http://webdesign.about.com/cs/loganalysistools/a/aaloganalysis.htm You may have to do log it to a database if you want to cross reference with other things and have nicer reports and better querying facility. For this you can use a Servlet Filter. Bruno Georges Glencore International AG Tel. +41 41 709 3204 Fax +41 41 709 3000 |---------+---------------------------> | | marju jalloh | | | <[EMAIL PROTECTED]| | | oo.com> | | | | | | 15.12.05 14:28 | | | Please respond | | | to "Tomcat Users| | | List" | | | | |---------+---------------------------> >--------------------------------------------------------------------------------------------------------------------------------------------------| | | | To: Tomcat Users List <users@tomcat.apache.org> | | cc: | | Subject: implementation difference between Cookie and HttpSession | | | |Distribute: | |Personal? |-------| | | | [ ] x | | | |-------| | | | >--------------------------------------------------------------------------------------------------------------------------------------------------| I want to track the last time a user visited my website and publish it.I don`t know the implementation difference between java Cookies and HttpSession or is it possible to use both. Byfour --------------------------------- Yahoo! Shopping Find Great Deals on Holiday Gifts at Yahoo! Shopping LEGAL DISCLAIMER. The contents of this e-mail and any attachments are strictly confidential and they may not be used or disclosed by someone who is not a named recipient. If you have received this email in error please notify the sender by replying to this email inserting the word "misdirected" as the message and delete this e-mail from your system. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]