I'm trying to use HttpUnit to test a servlet that forwards to a .jsp page.
I'm using ant from the command line with automated tests built in to the build process.
I've got no problems successfully testing servlets that do their own output (not using .jsp pages).
I've overcome a few problems by locating the right .jar files and adding them to my classpath.
Things look okay until my servlet code calls the forward method of the RequestDispatcher object, where I get:
Caused by: com.meterware.httpunit.HttpInternalErrorException: Error on HTTP request: 500 java.lang.ClassCastException: org.apache.tools.ant.util.SplitClassLoader cannot be cast to java.net.URLClassLoader
/viewallprojects.jsp is the .jsp file that the servlet is forwarding to.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.