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 60146 invoked from network); 5 Apr 2003 13:33:02 -0000 Received: from smtp5.wanadoo.fr (HELO mwinf0201.wanadoo.fr) (193.252.22.29) by daedalus.apache.org with SMTP; 5 Apr 2003 13:33:02 -0000 Received: from octovma (Mix-St-Germain-104-2-23.abo.wanadoo.fr [193.248.163.23]) by mwinf0201.wanadoo.fr (SMTP Server) with ESMTP id E54843000362 for ; Sat, 5 Apr 2003 15:33:00 +0200 (CEST) From: "Vincent Massol" To: "'Cactus Users List'" Subject: RE: Servlet Test Problem Date: Sat, 5 Apr 2003 15:32:52 +0200 Message-ID: <002c01c2fb77$dc73ece0$e1a3f8c1@octovma> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4024 In-Reply-To: <004201c2fb75$1a66b800$a93475cb@ronnie> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Ronnie, Please check http://jakarta.apache.org/cactus/integration/manual/howto_classpath.html . You=92ll see that you need servlet.jar on the client side classpath = too. Thanks -Vincent -----Original Message----- From: Ronnie [mailto:lormee2001@yahoo.com.sg]=20 Sent: 05 April 2003 15:13 To: cactus-user@jakarta.apache.org Subject: Servlet Test Problem Hi All, =A0 I have this problem that has been bugging me and preventing me from conducting tests on my Servlet! This error pops up whenever I try to run cactus. =A0 =A0 Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/ServletConfig =A0=A0=A0=A0=A0=A0=A0 at java.lang.Class.forName0(Native Method) =A0=A0=A0=A0=A0=A0=A0 at java.lang.Class.forName(Class.java:120) =A0=A0=A0=A0=A0=A0=A0 at edu.rmit.isys2049.s00013681.test.AllTests.class$(AllTests.java:13) =A0=A0=A0=A0=A0=A0=A0 at edu.rmit.isys2049.s00013681.test.AllTests.suite(AllTests.java:102) =A0=A0=A0=A0=A0=A0=A0 at edu.rmit.isys2049.s00013681.test.AllTests.main(AllTests.java:86) =A0 =A0 The following is my java test file: import junit.framework.*; import org.apache.cactus.*; import com.books.DispatcherServlet; =A0 public class=A0TestDispatcher extends ServletTestCase { =A0 =A0=A0=A0 public TestDispatcher(String name){ =A0=A0=A0=A0=A0 super(name); =A0=A0=A0 } =A0 =A0=A0=A0 public void setUp(WebRequest request) throws Exception { =A0=A0=A0=A0=A0=A0=A0 =A0 request.addParameter("firstName", = CUSTOMER_FIRSTNAME); =A0=A0=A0 =A0=A0=A0=A0=A0 request.addParameter("lastName", = CUSTOMER_LASTNAME); =A0=A0=A0 =A0=A0=A0=A0=A0 request.addParameter("address", = CUSTOMER_ADDRESS); =A0=A0=A0 =A0=A0=A0=A0=A0 request.addParameter("userName", = CUSTOMER_USERNAME); =A0=A0=A0 =A0=A0=A0=A0=A0 request.addParameter("password", = CUSTOMER_PASSWORD); =A0=A0=A0 =A0=A0=A0=A0=A0 request.addParameter("email", CUSTOMER_EMAIL); =A0=A0=A0=A0}//setUp() =A0 =A0=A0=A0 public void tearDown() throws Exception { =A0=A0 =A0}//tearDown() =A0 =A0=A0=A0=A0public void testAddCustomer() throws Exception{ =A0=A0=A0=A0=A0 DispatcherServlet dispatcher =3D new = DispatcherServlet(); =A0 =A0=A0=A0=A0=A0 dispatcher.init(config); =A0=A0=A0 } =A0 Whenever I remove the "dispatcher.init(config);" line, the testing goes without a hitch. I really can't see where I've gone wrong! =A0 Any help is greatly appreciated. =A0 =A0 Regards, Ronnie Choo