jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Robinson <Richa...@LDR.com>
Subject cactus.properties in classpath, cactus.contextURL
Date Wed, 01 Jan 2003 20:58:07 GMT
Hello,

I've read through the Cactus Howtos and have been moderately successful
installing and configuring Cactus 1.4.1 (J2EE 1.3) on a Red Hat Linux
7.1, using Tomcat 4.0.4 and JBoss 2.4. My webapp is in a different
directory than the default. I.e. "$HTTPD_DOCROOT/webapps/myWebApp". My
source files (JSP, servlets, EJBs, etc.) are compiled in a different
directory, using Ant, and deployed under the myWebApp. All this works as
it should.

A SampleServletTest file (as per the docs) works WHEN I add the
following to the beginSaveToSessionOK method:

   System.setProperty( "cactus.contextURL",
"http://host.domain.com:8080/myWebApp/" );

I am running the test via a brower (IE 5 on Win XP) using the following
URL:


http://host.domain.com/myWebApp/servlet/ServletTestRunner?suite=com.whatever.whatever.servlets.SampleServletTest



But I'd like to set the contextURL rather via the cactus.properties
file. I have one. But try as I may I cannot get the Tomcat JVM to pick
up on it. Contents of cactus.properties are one line as follows
(indented only for this email):

   cactus.contextURL = http://host.domain.com:8080/myWebApp/

I'm presuming it is a question of setting the JVM that Tomcat runs in.
Surely it cannot be the Jboss JVM. And there is no other JVM to speak
of. The Tomcat 4.0.4 Classloader howto is pretty explicit on where the
classpath is picked up and in what order. I've tried copying
cactus.properties (which incidentally is owned by root, but world and
group readable) to various places --

   $HTTPD_DOCROOT/webapps/myWebApp/classes
   $TOMCAT_HOME/common/classes
   $TOMCAT_HOME/classes
   In the same directory as the SampleServletTest file (under
webapp/crm/classes/package ... )

After rebooting Tomcat, and retrying the URL via a browser (as per
above), I still get this error: "Not Found: The requested URL
/myWebApp/ServletRedirector was not found on this server"

Does anyone have any suggestions?

I've even tried adding
"-Dcactus.contextURL=http://host.domain.com:8080/myWebApp/" to JAVA_OPTS
environment variable, exporting it (from tomcat rc file), which should
be picked up by the JVM Tomcat starts in, but this doesn't work either.

At this point I'm feeling a bit doubtful about my understanding of the
whole Tomcat Classloader stuff. But perhaps it is the format of the -D
command or the cactus.properties file?

Can any one help?

--
Richard Robinson


Mime
View raw message