rehi,
Try to start the testrunner, too:
<servlet>
<servlet-name>ServletTestRunner</servlet-name>
<servlet-class>
org.apache.cactus.server.runner.ServletTestRunner
</servlet-class>
<load-on-startup>20</load-on-startup>
</servlet>
I've seen this is not like the cactus-docu; I've forgotten why this all
must be:))
Bye
On Tue, 29 Aug 2006 13:01:34 +0200, Sushma <[EMAIL PROTECTED]> wrote:
Thanks Franz,Yes I have places "jspRedirector.jsp"
physicaly at [mywebapp]/Test/jspRedirector.jsp
Now I'm getting the following error... will you
please tell me how to solve this error.
<?xml version="1.0" encoding="UTF-8" ?>
- <testsuites>
- <testsuite name="HTMLSampleTestCase" tests="1"
failures="0" errors="1" time="0.016">
- <testcase name="testJspOutput" time="0.016">
<error message="Failed to get the test results at
[http://localhost:8080/Test/JspRedirector]"
type="org.apache.cactus.util.ChainedRuntimeException">org.apache.cactus.util.ChainedRuntimeException:
Failed to get the test results at
[http://localhost:8080/Test/JspRedirector] at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:92)
at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:306)
at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.java:159)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody0(HttpProtocolHandler.java:80)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody1$advice(HttpProtocolHandler.java:306)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java)
at
org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:144)
at
org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:215)
at
org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:133)
at
org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.java:308)
at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody0(ServletTestRunner.java:186)
at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody1$advice(ServletTestRunner.java:224)
at
org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunner.java)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:595)
org.apache.cactus.internal.client.ParsingException:
Not a valid response [404 /Test/JspRedirector] at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.callGetResult(DefaultHttpClient.java:211)
at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody0(DefaultHttpClient.java:87)
at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest_aroundBody1$advice(DefaultHttpClient.java:306)
at
org.apache.cactus.internal.client.connector.http.DefaultHttpClient.doTest(DefaultHttpClient.java)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runWebTest(HttpProtocolHandler.java:159)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody0(HttpProtocolHandler.java:80)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest_aroundBody1$advice(HttpProtocolHandler.java:306)
at
org.apache.cactus.internal.client.connector.http.HttpProtocolHandler.runTest(HttpProtocolHandler.java)
at
org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:144)
at
org.apache.cactus.internal.AbstractCactusTestCase.runBareClient(AbstractCactusTestCase.java:215)
at
org.apache.cactus.internal.AbstractCactusTestCase.runBare(AbstractCactusTestCase.java:133)
at
org.apache.cactus.server.runner.ServletTestRunner.run(ServletTestRunner.java:308)
at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody0(ServletTestRunner.java:186)
at
org.apache.cactus.server.runner.ServletTestRunner.doGet_aroundBody1$advice(ServletTestRunner.java:224)
at
org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunner.java)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:595)</error>
</testcase>
</testsuite>
</testsuites>
Thanks and Regards,
Suresh.
--- Franz Roth <[EMAIL PROTECTED]> wrote:
Hi,
try the following:
- add a leading slash to yout Jsp-File-Entry
[<jsp-file>/Test/jspRedirector.jsp</jsp-file>]
- set an loadonstartup element for the servlet
[<load-on-startup>21</load-on-startup>]
- assure the file jspRedirector.jsp is physical at
[yourwebapp]/Test/jspRedirector.jsp
bye
On Tue, 29 Aug 2006 12:18:20 +0200, Sushma
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm testing a jsp page for a table contents, below
is
> my testcase class.
>
> import com.meterware.httpunit.WebResponse;
> import com.meterware.httpunit.WebTable;
> import junit.framework.*;
> import org.apache.cactus.JspTestCase;
>
> public class HTMLSampleTestCase extends
JspTestCase {
>
> public void testJspOutput() {
>
> try {
>
>
> pageContext.forward("/hello.jsp");
>
> } catch (Throwable e) {
>
> assertTrue("Error: Exception
while
> forwarding the request:\n" + e,false);
> }
> }
>
> public static Test suite()
> {
>
> return new
TestSuite(HTMLSampleTestCase.class);
> }
>
> public void endJspOutput(WebResponse
res)throws
> Exception {
>
> WebTable table =
res.getTableWithID("table1");
>
>
> assertEquals("rows", 1,
table.getRowCount());
>
>
> }
>
> }
>
>
> The other changes I hv done is... added following
code
> in web.xml
>
> <servlet>
> <servlet-name>ServletRedirector</servlet-name>
>
<servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class>
> <init-param>
> <param-name>param1</param-name>
> <param-value>value1 used for
testing</param-value>
> </init-param>
> </servlet>
>
> <servlet>
> <servlet-name>JspRedirector</servlet-name>
> <jsp-file>Test/jspRedirector.jsp</jsp-file>
> <init-param>
> <param-name>param1</param-name>
> <param-value>value1 used for
> testing</param-value>
> </init-param>
> </servlet>
>
> <servlet>
> <servlet-name>ServletTestRunner</servlet-name>
>
<servlet-class>org.apache.cactus.server.runner.ServletTestRunner</servlet-class>
> </servlet>
>
>
> <servlet-mapping>
> <servlet-name>ServletRedirector</servlet-name>
> <url-pattern>/ServletRedirector</url-pattern>
> </servlet-mapping>
>
> <servlet-mapping>
> <servlet-name>JspRedirector</servlet-name>
> <url-pattern>/JspRedirector/</url-pattern>
> </servlet-mapping>
>
> <servlet-mapping>
> <servlet-name>ServletTestRunner</servlet-name>
> <url-pattern>/ServletTestRunner</url-pattern>
> </servlet-mapping>
>
>
>
> Also I hv placed the jspRedirector.jsp file in my
> application folder,
> I'm runing the application through this URL
>
"http://localhost:8080/Test/ServletTestRunner?suite=HTMLSampleTestCase"
>
> Now I'm getting a Http status 404 error.
> and I dont know should I place the
cactus.properties
> file or not if so where should I place?
>
> please help me... I'm stuck on this since long
time
>
> Thanks and regards,
> Suresh
>
>
>
>
>
>
__________________________________________________________
> Yahoo! India Answers: Share what you know. Learn
something new
> http://in.answers.yahoo.com/
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
[EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]
>
--
franz roth
schulstr. 15
72669 Unterensingen
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
franz roth
schulstr. 15
72669 Unterensingen
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]