Connecting Tech Pros Worldwide Forums | Help | Site Map

testing JSP with catcus

oll3i's Avatar
Site Addict
 
Join Date: Mar 2007
Posts: 563
#1: Sep 20 '08
I try to do some jsp testing with cactus but i couldn't make it work
Where should the cactus jars go .I use tomcat 5.5.
I read the tutorial, i put jars where it told me to but later i read a different tutorial that said something else.
I want to test jsp sites.
Maybe there is some plugin for eclipse?

Thank YOU

oll3i's Avatar
Site Addict
 
Join Date: Mar 2007
Posts: 563
#2: Sep 20 '08

re: testing JSP with catcus


i followed the tutorial http://jakarta.apache.org/cactus/integration/howto_tomcat.html
but when i try to compile a sample application to test (from cactus site)
i get



C:\PROGRA~1\TOMCAT~1.5\WEBAPPS\TEST\WEB-INF\CLASSES>javac TestSampleServlet.java
TestSampleServlet.java:1: package junit.framework does not exist
import junit.framework.Test;
^
TestSampleServlet.java:2: package junit.framework does not exist
import junit.framework.TestSuite;
^
TestSampleServlet.java:4: package org.apache.cactus does not exist
import org.apache.cactus.ServletTestCase;
^
TestSampleServlet.java:5: package org.apache.cactus does not exist
import org.apache.cactus.WebRequest;
^
TestSampleServlet.java:7: cannot find symbol
symbol: class ServletTestCase
public class TestSampleServlet extends ServletTestCase
^
TestSampleServlet.java:14: cannot find symbol
symbol : class Test
location: class TestSampleServlet
public static Test suite()
^
TestSampleServlet.java:19: cannot find symbol
symbol : class WebRequest
location: class TestSampleServlet
public void beginSaveToSessionOK(WebRequest webRequest)
^
TestSampleServlet.java:16: cannot find symbol
symbol : class TestSuite
location: class TestSampleServlet
return new TestSuite(TestSampleServlet.class);
^
TestSampleServlet.java:27: cannot find symbol
symbol : variable request
location: class TestSampleServlet
servlet.saveToSession(request);
^
TestSampleServlet.java:28: cannot find symbol
symbol : variable session
location: class TestSampleServlet
assertEquals("it works!", session.getAttribute("testAttribute"));
^
10 errors

C:\PROGRA~1\TOMCAT~1.5\WEBAPPS\TEST\WEB-INF\CLASSES>
oll3i's Avatar
Site Addict
 
Join Date: Mar 2007
Posts: 563
#3: Sep 20 '08

re: testing JSP with catcus


hmm i managed to do the sample testing(from cactus) i added jars to eclipse project and started tomcat (have Sysdeo) and it works but now if i wanted to test a jsp page what do i have to write to test it?
Reply