tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <>
Subject RE: check for session
Date Fri, 06 Jun 2003 16:42:23 GMT

Consider using a Filter as follows:

public void doFilter(...) {
  if(request instanceof HttpServletRequest) {
    HttpSession theSession = ((HttpServletRequest)
    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

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
>my httpSession as "dmSession" upon successful logon.  I want to check
>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.

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:

View raw message