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 Russ Baker <rb...@NETdelivery.com> on 2001/11/14 22:50:51 UTC

Multiple apps and the cactus.properties file

I have a question about having multiple apps, but one location to test them
from.  In the cactus.properties file, we define the context for the
ServletRedirector and the JSPRedirector as being:
cactus.servletRedirectorURL =
http://localhost:80/testApp/servlet/ServletRedirector/
cactus.jspRedirectorURL = http://localhost:80/testApp/servlet/JspRedirector/

However, in our case we may have several apps, but we want to make sure that
the context is preserved.  What we have done is put the servlet information
into the web.xml file in our test app (test context), but when we test other
servlets in other apps (other contexts) the RequestDispatcher tries to do a
forward and gives a null pointer exception.

The thought I had was to put different versions of the cactus.properties
file in each of the web apps WEB-INF/classes directory with their own
context (e.g. cactus.servletRedirectorURL =
http://localhost:80/realWebbAppContext/servlet/ServletRedirector/).  Will
this work, or will it always default to the one we place in the applications
classpath?

Thanks,

Russ

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


Re: Multiple apps and the cactus.properties file

Posted by Vincent Massol <vm...@octo.com>.

----- Original Message -----
From: "Russ Baker" <rb...@NETdelivery.com>
To: "'Cactus Users List'" <ca...@jakarta.apache.org>
Sent: Wednesday, November 14, 2001 9:50 PM
Subject: Multiple apps and the cactus.properties file


> I have a question about having multiple apps, but one location to test
them
> from.  In the cactus.properties file, we define the context for the
> ServletRedirector and the JSPRedirector as being:
> cactus.servletRedirectorURL =
> http://localhost:80/testApp/servlet/ServletRedirector/
> cactus.jspRedirectorURL =
http://localhost:80/testApp/servlet/JspRedirector/
>
> However, in our case we may have several apps, but we want to make sure
that
> the context is preserved.  What we have done is put the servlet
information
> into the web.xml file in our test app (test context), but when we test
other
> servlets in other apps (other contexts) the RequestDispatcher tries to do
a
> forward and gives a null pointer exception.
>
> The thought I had was to put different versions of the cactus.properties
> file in each of the web apps WEB-INF/classes directory with their own
> context (e.g. cactus.servletRedirectorURL =
> http://localhost:80/realWebbAppContext/servlet/ServletRedirector/).  Will
> this work, or will it always default to the one we place in the
applications
> classpath?

no because the cactus.properties file is only used on the client side (which
finds in it the url to call the redirector). At the moment, this is not
supported. Here is what I propose :
- define a -Dcactus.config=<location of cactus.properties file> that
overrides any cactus.properties put in the classpath.
- this would let you define several <junit> task in your ant build file and
pass a different cactus.properties file for the different applications to
test.

Do you like it ?
-Vincent

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


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