Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 75743 invoked from network); 15 Jan 2003 05:49:18 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 15 Jan 2003 05:49:18 -0000 Received: (qmail 22559 invoked by uid 97); 15 Jan 2003 05:50:32 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@jakarta.apache.org Received: (qmail 22541 invoked by uid 97); 15 Jan 2003 05:50:31 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 22529 invoked by uid 98); 15 Jan 2003 05:50:31 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) From: "Jason L. Buberel" To: "Struts Users Mailing List" Subject: Re: How to Access an Application Scope object in a Struts Action Date: Tue, 14 Jan 2003 21:49:08 -0800 User-Agent: KMail/1.5 References: <1042607230.25386.ezmlm@jakarta.apache.org> In-Reply-To: <1042607230.25386.ezmlm@jakarta.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200301142149.08203.jason@xtime.com> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Rana, Are you using a Servlet Container that is compatible with the Java Servlet 2.3 API? If so, this sort of thing should be implemented as a Servlet Filter: http://java.sun.com/j2ee/sdk_1.3/techdocs/api/index.html We use this in our product to verify authentication credentials and such. Works quite nicely. If that is not an option for you, you can use an Application Scoped map which you can access from within an Action class using: this.getServlet().getServletContext().setAttribute("USER_MAP", userMap); Map userMap = this.getServlet().getServletContext().getAttribute("USER_MAP"); Or something like that. -jason > I am working on a similar monitor class to track the users logged into a > web application at any given time. This information is displayed when user > logs into the web application. > > i am trying to accomplish this using ServletContextListener and > HttpSessionAttributeListener classes in the servlet API. > > Any help/ideas about tracking users currently logged into a web application > are most welcome. > > Thanks, > Rana. -- To unsubscribe, e-mail: For additional commands, e-mail: