• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Question about setting up Cactus for JSP Testing

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Folks,

I am using Cactus to unit test servlets and jsps. My configuration of Cactus is as follows:

cactus.properties

cactus.contextURL = http://localhost:9081/contextRoot

no other entries in this file. I am using the default ServletRedirector and ServletTestRunner.

I am now trying to test custom tags that extend JspTestCase. Accordingly, I added the entries for the JspRedirector to the web.xml file. The entries are as follows:

web.xml

<servlet>
<servlet-name>JspRedirector</servlet-name>
<servlet-class>/jspRedirector.jsp</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>JspRedirector</servlet-name>
<url-pattern>/JspRedirector</url-pattern>
</servlet-mapping>

The jspRedirector.jsp is located in the WEB-INF directory of the web application.

On trying to run the test by invoking the following url, I get the error message below:

Error 500: Missing service name parameter [Cactus_Service] in HTTP request. Received query string is [null].

The url used is:

http://localhost:9081/contextRoot/jspRedirector.jsp

Any pointers on what I am doing incorrectly.

Thanks,
Samarth
 
Well behaved women rarely make history - Eleanor Roosevelt. tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic