Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 59049 invoked from network); 9 Sep 2002 17:00:13 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 9 Sep 2002 17:00:13 -0000 Received: (qmail 24612 invoked by uid 97); 9 Sep 2002 17:00:22 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 24597 invoked by uid 97); 9 Sep 2002 17:00:22 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 11376 invoked by uid 98); 9 Sep 2002 14:21:17 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <07e101c2580c$d4b26c70$0b01a8c0@RainersPC> From: "rainer juenger" To: "Tomcat Users List" Subject: ServletContext in a Bean Date: Mon, 9 Sep 2002 16:25:56 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_07DE_01C2581D.930B6A90" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------=_NextPart_000_07DE_01C2581D.930B6A90 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, how can I access the ServeltContext in a bean? Could you give me sample: e.g. import javax.servlet.*; // something like that, but getServletConfig() is of course not known in = a normal bean. ServletContext ctx =3D getServletConfig().getServletContext(); String dbdriver =3D ctx.getAttribute(Constants.DBDRIVER); thanks for any help! Rainer ------=_NextPart_000_07DE_01C2581D.930B6A90--