You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by rainer juenger <ja...@projektinter.net> on 2002/09/09 16:25:56 UTC

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

Re: PLEASE IGNORE: ServletContext in a Bean

Posted by in...@projektinter.net.
somehow a double posting. Please ignore!

rainer


----- Original Message -----
From: "rainer juenger" <ja...@projektinter.net>
To: "Tomcat Users List" <to...@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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Tomcat and reload of application not kiling all processes

Posted by Ashish Kulkarni <ku...@yahoo.com>.
Hi,
I am using tomcat4.0.4 on windows 2000, i am
developing a webapplication fro AS400 database (DB2)
when i start tomcat, it creates 4 connections on AS400
for connection pooling.
but when i relaod the application from tomcat manager,
or when i modify a servlet( it reloads the application
since i have configured it in server.xml file)
it does not kill these connections on AS400, but
creates new connections...
when i shutdown tomcat, it kills all the connections.
so why is this happening, I have this connection
pooling object in my servlet context, so when ever i
restart, I think it must kill the existing
connections,
any suggestions
Ashish


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>