aspose file tools*
The moose likes Testing and the fly likes Question about setting up Cactus for JSP Testing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Question about setting up Cactus for JSP Testing" Watch "Question about setting up Cactus for JSP Testing" New topic
Author

Question about setting up Cactus for JSP Testing

Samarth Kumar
Greenhorn

Joined: Mar 30, 2004
Posts: 12
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question about setting up Cactus for JSP Testing
 
Similar Threads
URL pattern for servlet mapping
problem in running servlet
How to set conf file file
yet another 404 status code message
Web Application Folder