jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Rabe <dr...@opentext.com>
Subject Accessing the servlet that's already running?
Date Sat, 13 Dec 2003 02:37:47 GMT
There's something that I just don't get, and it's causing my brain to hurt.
;-) I hope someone can set me straight.

I'm using Tomcat 5.0, Struts 1.1, and Cactus 1.5 on Windows XP.

When I run the <cactus> task from ant, it starts up Tomcat, which unpacks my
cactified war, and starts my servlet, right? I *think* what I want to do is
code my test (a subclass of ServletTestCase) so that I specify the request
in my beginXX, and in endXX I want to sanity-check the output. What do I do
in testXX? The examples I've seen show creation and initialization of a
Servlet in textXX... but... but... my servlet's already instantiated and
running, right? It seems like my testXX should be able to get a reference to
that already-running servlet and just call doService() on it; however, I
can't seem to get a reference to the servlet. What am I missing here?

I know that my servlet has problems when I try to destroy it and
re-instantiate it (because of statics in some legacy code we're using). Is
this likely to cause problems anywhere other than in cactus-type testing?

Thanks in advance,
--DanR


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