|
Hi,
I'm trying to get a Cactus servlet up and running
under JBoss 2.4.1 (running Tomcat 3.2.x). I believe I've got my classpaths set
up properly, by making sure commons-cactus.jar, log4j.jar, junit.jar are
available to both servlet VM, and the Ant VM from which I run the junit tasks. I
get no ClassNoDefExceptions or other classpath errors.
When I set the cactus.servletRedirectorURL = http://localhost:8080/servc/ServletRedirector/
I get the following error:
Server returned HTTP response code: 500 for URL: http://localhost:8080/servc/ServletRedirector/
java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost:8080/servc/ServletRedirector/ at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:564) My servc.war web.xml looks like this
(extract):
<=====================================================================>
<servlet>
<servlet-name>ServletRedirector</servlet-name> <servlet-class>org.apache.commons.cactus.server.ServletTestRedirector</servlet-class> </servlet> <servlet-mapping> <servlet-name>ServletRedirector</servlet-name> <url-pattern>/ServletRedirector/</url-pattern> </servlet-mapping> <servlet> <servlet-name>FrontController</servlet-name> <servlet-class>uk.co.servsoft.servc.web.FrontController</servlet-class> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>FrontController</servlet-name> <url-pattern>/Main/*</url-pattern> </servlet-mapping> <=====================================================================>
My test methods looks like this:
public void beginCreateAccount(ServletTestRequest
theRequest) {
theRequest.addParameter("account.name","Tesco"); theRequest.addParameter("account.reference-no","123456789"); theRequest.addParameter("account.type","Corporate"); theRequest.addParameter("account.status","Active"); } public void testCreateAccount()
{
System.out.println("Running create account test..."); try
{
// Some object instantiation and prep FrontController fcServlet = new FrontController(); fcServlet.init(config);
for(java.util.Enumeration e=request.getParameterNames(); e.hasMoreElements(); )
{
String paramName = (String)e.nextElement(); System.out.println(paramName); } // Let's call the
servlet
fcServlet.doPost(request,response); } catch (ServletException se) { System.err.println(se.getMessage()); se.printStackTrace(); } catch (IOException io) { System.err.println(io.getMessage()); io.printStackTrace(); } }
When I change cacturs redirect-url to something that does exist
cactus.servletRedirectorURL = http://localhost:8080/servc/ServletRedirectorDoesNotExist/ I get a java.io.FileNotFoundException: http://localhost:8080/servc/ServletRedirectorDoesNotExist/ as
expected, so the servlet call listed at the top of this email is "causing"
something to happen.
Does anyone have any ideas
?
Cheers,
Ijonas.
|
- Re: Server returned HTTP response code: 500 Ijonas Kisselbach
- Re: Server returned HTTP response code: 500 Rakesh Bhalla
