Hi Volker,

Your use case (using the same cactus installation to test different web
applications) is not supported by Cactus. I'm actually surprised it
could work at all! :-)

The way to run Cactus tests on a given web application is by cactifying
this web application. So if you have 2 web applications, you're supposed
to cactify 2 web applications, each installing its own cactus
redirectors.

This means that it was pure luck that Cactus was working for you
before... ;-)

That said, I'm curious to understand better your use case as I'm always
happy to improve Cactus. I have a few questions:

- where are the cactus tests located? In test1 webapp? In test2 webapp?
In another webapp?
- in which webapp are the cactus redirectors installed?

Also, the call to setSystemProperties() happen in the doGet() method,
i.e. for each call to the Servlet Test Runner. Thus, if the contextURL
property changes, it should work fine, no? It means that you would need
to change this property between your 2 webapp tests, which seems normal
to me. What am I missing?

Thanks
-Vincent

> -----Original Message-----
> From: Volker Krebs [mailto:[EMAIL PROTECTED]
> Sent: 16 June 2004 16:12
> To: [EMAIL PROTECTED]
> Subject: ServletTestRunner and multiple Web Applications
> 
> Hello,
> 
> in our environment we are running diffrent tests as diffrent Web
> Applications in Tomcat (4.1.29). This means that we deploy a web
> application (e.g. test1) run some test and undeploy test1. Then test2
> gets deployed some tests are run and it gets undeployed. Same with
> test3, test4 and so on.
> 
> In cactus 1.5 this seemed to be no problem but since we have updated
to
> version 1.6.1 only application test1 can be tested succesfully. The
> application test2 tries to get test1/ServletRedirector which is
already
> undeployed.
> 
> I've looked at the source and found the reason for that.
> In
>
org.apache.cactus.server.runner.ServletTestRunner.setSystemProperties(Ht
tp
> ServletRequest)
> thr property BaseConfiguration.CACTUS_CONTEXT_URL_PROPERTY
(contextURL)
> is read from the Systemproperties. For test1 there is no such
> systemproperty so it will be created from the request. But when test2
is
> run it reads the systemproperties and finds the property which was set
> in test1 (contextpath test1), which leads to an error.
> 
> I think it would be nice to make the property "cactus.contextURL"
> optional like in Version 1.5. For example by removing the
systemproperty
> "cactus.contextURL" when ServletTestRunner is undeployed.
> 
> thanks,
> 
> Volker
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to