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 72962 invoked by uid 99); 25 Aug 2005 21:42:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Aug 2005 14:42:36 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of anjali.shenoy@bankofamerica.com designates 171.159.64.79 as permitted sender) Received: from [171.159.64.79] (HELO sfdmzmailmx02.bankofamerica.com) (171.159.64.79) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Aug 2005 14:42:52 -0700 Received: from sfdmzmailmx01.bankofamerica.com ([171.182.72.78]) by sfdmzmailmx02.bankofamerica.com (8.12.11/8.12.11) with ESMTP id j7PLgYDD025436 for ; Thu, 25 Aug 2005 21:42:34 GMT Received: from memscmpl3. (casfodc07s889.bankofamerica.com [165.48.14.226]) by sfdmzmailmx01.bankofamerica.com (8.12.11/8.12.11) with SMTP id j7PLgXF8024292 for ; Thu, 25 Aug 2005 21:42:34 GMT Received: from memmta0202 (171.186.107.205) by memscmpl3. (Sigaba Gateway v3.6.1) with ESMTP id 236411034; Thu, 25 Aug 2005 14:42:34 -0700 Date: Thu, 25 Aug 2005 14:42:33 -0700 From: "Shenoy, Anjali" Subject: Testing servlets with cactus To: cactus-user@jakarta.apache.org Message-id: MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT Content-class: urn:content-classes:message Thread-topic: Testing servlets with cactus Thread-index: AcWpvea8kyrTxpMoQ1ygbidH6cW+yA== X-MS-Has-Attach: X-MS-TNEF-Correlator: X-OriginalArrivalTime: 25 Aug 2005 21:42:33.0940 (UTC) FILETIME=[E7005940:01C5A9BD] X-Virus-Checked: Checked by ClamAV on apache.org Has anyone successfully tested servlets with cactus??? I have the following requirements: JBuilder - Not really a requirement but convinient. JRun 3.0 my code looks as follows: package com.boa.gcib.docwf.newsdm.servlets; import org.apache.cactus.ServletTestCase; import org.apache.cactus.WebRequest; import org.apache.cactus.WebResponse; import junit.framework.*; import java.io.*; public class TestLogin extends ServletTestCase{ private TestLogin loginTest = null; private static final String USER_ID_KEY = "strUserID"; private static final String PASSWORD_KEY = "strPassword"; private static final String ACTIVE = "Y"; public void beginDummyTest(WebRequest theRequest){ theRequest.setURL("http://localhost", "/servlet", "/com.boa.gcib.docwf.newsdm.servlets.login", "/", null); System.out.println(theRequest.getURL().getContextPath()); // theRequest.get // login.getServletContext().getContext("http://localhost/servlets/com.boa.gcib.docwf.newsdm.servlets.login"); } // protected void tearDown() throws Exception { // loginTest = null; // super.tearDown(); // } public void testDummyTest(){ assertEquals(loginTest.USER_ID_KEY, "abcde"); } } It doesn't matter what I type in or try in the code, when I run the test, it always gives me a ChainedRuntimeException: Missing cactus property[cactus.contextURL]. But I've already set the URL in the "begin" method!! Does anyone have any ideas??? Thanks!