tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Collins, Jim" <>
Subject RE: check for session
Date Mon, 09 Jun 2003 09:13:44 GMT
Hi Mark,

I use Documentum and struts and had something similar to what you now have
with a Filter determining if a user has a dmSession. I found however that on
a number of occasions when the filter was checking for dmSession it was
returning null (even though I knew it had previously been created) and the
app was recreating the session and saving it. I have now removed the filter
and written a custom tag that checks for the existence of the dmSession and
if it does not exist creates it, if there is a problem creating the
dmSession the user is redirected to an error page.



-----Original Message-----
From: Mark F []
Sent: 06 June 2003 19:42
To: Tomcat Users List
Subject: Re: check for session

Thanks, worked like a charm, never used that before, very nice.  The
filtering mechanism though makes me wish I'd set up the app directory
structure differently but you know hindsight 20/20 and all that...


Shapira, Yoav wrote:
| Howdy,
| Consider using a Filter as follows:
| public void doFilter(...) {
|   if(request instanceof HttpServletRequest) {
|     HttpSession theSession = ((HttpServletRequest)
| request).getSession();
|     if(theSession.getAttribute("dmSession") == null) {
|       // Redirect to login page, print out error message, whatever
|     }
|   }
|   // Pass the request on
|   chain.doFilter(request, response);
| }
| Map this filter to whatever you need authenticated (/* is one
| possibility).
| Yoav Shapira
| Millennium ChemInformatics
|| -----Original Message-----
|| From: Mark F []
|| Sent: Friday, June 06, 2003 12:16 PM
|| To: Tomcat Users List
|| Subject: check for session
|| We use a content management system (documentum) it operates much
|| like a database as far as authentication.  I save a documentum
|| session object into my httpSession as "dmSession" upon successful
|| logon.  I want to check for the existence of this session on every
|| page after the logon page, or if there is an easier way please let
|| me know?
|| Any help would really be appreciated.
|| Thanks,
|| -Mark
| 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:
| For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

PLEASE READ: The information contained in this email is confidential
and intended for the named recipient(s) only. If you are not an intended
recipient of this email you must not copy, distribute or take any 
further action in reliance on it and you should delete it and notify the
sender immediately. Email is not a secure method of communication and 
Nomura International plc cannot accept responsibility for the accuracy
or completeness of this message or any attachment(s). Please examine this
email for virus infection, for which Nomura International plc accepts
no responsibility. If verification of this email is sought then please
request a hard copy. Unless otherwise stated any views or opinions
presented are solely those of the author and do not represent those of
Nomura International plc. This email is intended for informational
purposes only and is not a solicitation or offer to buy or sell
securities or related financial instruments. Nomura International plc is
regulated by the Financial Services Authority and is a member of the
London Stock Exchange.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message