tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@projektinter.net
Subject Re: PLEASE IGNORE: ServletContext in a Bean
Date Mon, 09 Sep 2002 17:12:59 GMT
somehow a double posting. Please ignore!

rainer


----- Original Message -----
From: "rainer juenger" <jakarta_rainer@projektinter.net>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Monday, September 09, 2002 4:25 PM
Subject: ServletContext in a Bean


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 = getServletConfig().getServletContext();
String dbdriver = ctx.getAttribute(Constants.DBDRIVER);

thanks for any help!

Rainer




--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message