jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sushma Suresh <era_sus...@yahoo.co.in>
Subject problem with httpunit-1.6: Unable to retrieve script included by this response
Date Thu, 31 Aug 2006 09:08:47 GMT
Hi,

Now getting some other problem.

the code is as follows...

endJspOutput(com.meterware.httpunit.WebResponse
res)throws Exception { 
  
	 HttpUnitOptions.setScriptingEnabled( false ); 
         WebTable[] table = res.getTables();
         assertEquals("table", 1, table.length );
      }
Actually the JSP which I'm using has javascript.
However Httpunit doc says by setting
HttpUnitOptions.setScriptingEnabled( false ); we can
turn off scripting.
"http://httpunit.sourceforge.net/doc/faq.html#disable%20scripting"
however that does not seem to have any
effect in the above code.

The error message I'm getting is as follows...

is it necessary to include js.jar...please suggest how
to go abt it.

  <?xml version="1.0" encoding="UTF-8" ?> 
- <testsuites>
- <testsuite name="HTMLSampleTestCase" tests="1"
failures="0" errors="1" time="2.219">
- <testcase name="testJspOutput" time="2.141">
  <error message="Unable to retrieve script included
by this response, since it was loaded by
getResource(). Use getResponse() instead."
type="java.lang.IllegalStateException">java.lang.IllegalStateException:
Unable to retrieve script included by this response,
since it was loaded by getResource(). Use
getResponse() instead. at
com.meterware.httpunit.ParsedHTML.getIncludedScript(ParsedHTML.java:356)
at
com.meterware.httpunit.ParsedHTML.getScript(ParsedHTML.java:339)
at
com.meterware.httpunit.ParsedHTML.interpretScriptElement(ParsedHTML.java:319)
at
com.meterware.httpunit.ParsedHTML.access$700(ParsedHTML.java:37)
at
com.meterware.httpunit.ParsedHTML$ScriptFactory.recordElement(ParsedHTML.java:489)
at
com.meterware.httpunit.ParsedHTML$2.processElement(ParsedHTML.java:702)
at
com.meterware.httpunit.NodeUtils$PreOrderTraversal.perform(NodeUtils.java:195)
at
com.meterware.httpunit.ParsedHTML.loadElements(ParsedHTML.java:718)
at
com.meterware.httpunit.ParsedHTML.getTables(ParsedHTML.java:185)
at
com.meterware.httpunit.WebResponse.getTables(WebResponse.java:555)
at
HTMLSampleTestCase.endJspOutput(HTMLSampleTestCase.java:69)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at
org.apache.cactus.internal.client.ClientTestCaseCaller.callGenericEndMethod(ClientTestCaseCaller.java:441)
at
org.apache.cactus.internal.client.ClientTestCaseCaller.callEndMethod_aroundBody2(ClientTestCaseCaller.java:208)
at
org.apache.cactus.internal.client.ClientTestCaseCaller.callEndMethod_aroundBody3$advice(ClientTestCaseCaller.java:306)
at
org.apache.cactus.internal.client.ClientTestCaseCaller.callEndMethod(ClientTestCaseCaller.java)
at
org.apache.cactus.internal.client.ClientTestCaseCaller.runTest(ClientTestCaseCaller.java:148)
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
com.hypertechsolutions.ipm.controller.UtfFilter.doFilter(UtfFilter.java:47)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at
com.hypertechsolutions.ipm.controller.GZIPFilter.doFilter(GZIPFilter.java:27)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
at
com.hypertechsolutions.ipm.controller.ThreadInitializerFilter.doFilter(ThreadInitializerFilter.java:26)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
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.


		
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/

Mime
View raw message