tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "rainer juenger" <jakarta_rai...@projektinter.net>
Subject ServletContext in a Bean
Date Mon, 09 Sep 2002 14:25:56 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message