You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Raffaella Coccioli <r....@libero.it> on 2002/02/21 15:24:26 UTC
init() method not invoked
When I invoke a servlet method from a test method I expect that the simulated servlet container automatically invokes the init(ServerConfig config) method.
Why doesn't it happen?
If this is normal, how can I do to enforce the init(config) invocation?
P.S I'm using Tomcat 4.0.1
Thanks in advance
RE: init() method not invoked
Posted by Nicholas Lesiecki <ni...@eblox.com>.
<<<
When I invoke a servlet method from a test method I expect that the
simulated servlet container automatically invokes the init(ServerConfig
config) method.
>>>
Unfortunately this is just not how it works :) You have to call the
init(config) method manually in your setUp (or wherever suits your needs).
The problem with automating this test is that there is no way for the Cactus
test class to know which object needs to be init()'ed.
BTW, the servlet container is not "simulated"--it's the real container.
Cheers,
nick
-----Original Message-----
From: Raffaella Coccioli [mailto:r.coccioli@libero.it]
Sent: Thursday, February 21, 2002 7:24 AM
To: Cactus Users List
Subject: init() method not invoked
When I invoke a servlet method from a test method I expect that the
simulated servlet container automatically invokes the init(ServerConfig
config) method.
Why doesn't it happen?
If this is normal, how can I do to enforce the init(config) invocation?
P.S I'm using Tomcat 4.0.1
Thanks in advance
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>