Return-Path: list-help: list-unsubscribe: List-Post: List-Id: Mailing-List: contact cactus-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list cactus-user@jakarta.apache.org Received: (qmail 326 invoked by uid 98); 1 Jan 2003 20:43:42 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Received: (qmail 305 invoked from network); 1 Jan 2003 20:43:39 -0000 Received: from daedalus.apache.org (HELO apache.org) (63.251.56.142) by nagoya.betaversion.org with SMTP; 1 Jan 2003 20:43:39 -0000 Received: (qmail 56157 invoked by uid 500); 1 Jan 2003 20:42:20 -0000 Received: (qmail 56150 invoked from network); 1 Jan 2003 20:42:20 -0000 Received: from smtp.easystreet.com (206.26.36.40) by daedalus.apache.org with SMTP; 1 Jan 2003 20:42:20 -0000 Received: from LDR.com (dsl-208-151-246-68.dsl.easystreet.com [208.151.246.68]) by smtp.easystreet.com (8.11.2/8.11.2) with ESMTP id h01KgPH15423 for ; Wed, 1 Jan 2003 12:42:25 -0800 (PST) Sender: richardr@easystreet.com Message-ID: <3E13636B.F8D80120@LDR.com> Date: Wed, 01 Jan 2003 13:53:47 -0800 From: Richard Robinson Organization: LDR International X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.16-22smp i686) X-Accept-Language: en MIME-Version: 1.0 To: Cactus Users List Subject: Re: cactus.properties in classpath, cactus.contextURL References: <3E13565F.CA1F117C@LDR.com> Content-Type: multipart/alternative; boundary="------------07AA4D7C4917C353B0D517FB" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --------------07AA4D7C4917C353B0D517FB Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Some extra information. I've created a ServletTest.java (not using Cactus or Junit...) in the same directory as SampleServletTest.java. ServletTest.java is basically a hollow servlet that merely prints out the current value (if any) of the cactus.contextURL. (System.getProperty( "cactus.contextURL"). Even though I *do* have a cactus.properties file in the JVM classpath ($TOMCAT/common/classes) which contains, as specified in last posting, a cactus.contextURL of "http://host.domain.com:8080/myWebApp/", nevertheless the ServletTest.java displays the following value: cactus.contextURL: null Which leads me to conclude that cactus.properties file is NOT being picked up on. Any ideas where I should be putting the cactus.properties file for server side testing with Cactus? -- Richard Richard Robinson wrote: > 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 > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: -- Richard Robinson Operations Manager Fusion Systems International T: 503-255-5800 x172 E: RichardR@FusionSystems.com W: http://www.FusionSystems.com --------------07AA4D7C4917C353B0D517FB--