Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 28093 invoked from network); 1 Mar 2005 16:23:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Mar 2005 16:23:54 -0000 Received: (qmail 52046 invoked by uid 500); 1 Mar 2005 16:23:41 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 52026 invoked by uid 500); 1 Mar 2005 16:23:41 -0000 Mailing-List: contact user-help@struts.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 user@struts.apache.org Received: (qmail 52012 invoked by uid 99); 1 Mar 2005 16:23:41 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from viefep11-int.chello.at (HELO viefep11-int.chello.at) (213.46.255.27) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 01 Mar 2005 08:23:39 -0800 Received: from gwextensa ([62.178.82.35]) by viefep11-int.chello.at (InterMail vM.6.01.04.01 201-2131-118-101-20041129) with ESMTP id <20050301162335.IVL2566.viefep11-int.chello.at@gwextensa> for ; Tue, 1 Mar 2005 17:23:35 +0100 From: =?iso-8859-1?Q?G=FCnther_Wieser?= To: "'Struts Users Mailing List'" Subject: AW: Need Help Passing Data Values To My subclass Action class Date: Tue, 1 Mar 2005 17:23:30 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Thread-Index: AcUeePqcigzaMRKRQF+ot5JADkRLZAAAS8Lw In-Reply-To: <34385CBC5E8E664EB0007814636AB36A012D58A4@exchange1.dimensions.com> Message-Id: <20050301162335.IVL2566.viefep11-int.chello.at@gwextensa> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N use request.getSession().getServletContext() in the action class to = receive the context of the struts action servlet, and you can use the action = class to set a property of the action form as you would do it if you want to prepopulate form data (a good example is described in http://www.javaworld.com/javaworld/jw-09-2004/jw-0913-struts-p3.html = using two action classes, one for prepopulating the action form and one for = the actual "doing"). also you could implement a class that gets initialized during loading of = a webapp (e.g. implementing ServletContextListener ) and gets all data = from servlet context into a hashmap, and have a static method that retrieves = the data from this hash map. kr, guenther -----Urspr=FCngliche Nachricht----- Von: Scott Purcell [mailto:spurcell@vertisinc.com]=20 Gesendet: Dienstag, 01. M=E4rz 2005 17:09 An: user@struts.apache.org Betreff: Need Help Passing Data Values To My subclass Action class I am trying to pass a value that is configured in my web.xml which is my "databaseID" that I need in my Action class. =20 I have asked prior, but received no help, so I am trying again. If I = have a value in the deployment file that I can get out using a ServletContext, = how can I get that into a subclass of an Action class, or even to a = ActionForm subclass, since neither extend the HttpServlet class? =20 I would appreciate any input, Sincerely Scott =20 =20 =20 --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org