Hi Vincent,

I removed the trailing "/" from my url-pattern in web.xml and I no longer
get the InputStream error.  However, I get a 500 when I test now.  Tomcat
gives me the following mapping error.

[INFO,EmbeddedCatalinaServiceSX] StandardHost[localhost]: MAPPING
configuration
error for request URI
[ERROR,EmbeddedCatalinaServiceSX] HttpProcessor[8080][4] process.invoke
java.lang.NullPointerException
        at
org.apache.catalina.valves.ErrorDispatcherValve.status(ErrorDispatche

        
My unit test gives me:

Server returned HTTP response code: 500 for URL:
http://localhost:8080/test/ServletRedirector?Cactus_TestMethod=testLogin&Cac
tus_TestClass=com.mytest.web.servlet.test.Test_MyController_00&Cactus_Automa
ticSession=true&Cactus_Service=CALL_TEST 

java.io.IOException: Server returned HTTP response code: 500 for URL:
http://localhost:8080/test/ServletRedirector?Cactus_TestMethod=testLogin&Cac
tus_TestClass=com.mytest.web.servlet.test.Test_MyController_00&Cactus_Automa
ticSession=true&Cactus_Service=CALL_TEST
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection
.java:562)
at
org.apache.cactus.client.AutoReadHttpURLConnection.getInputStream(AutoReadHt
tpURLConnection.java;org/apache/cactus/util/log/LogAspect.java(1k):130)
at
org.apache.cactus.client.AbstractHttpClient.callRunTest(AbstractHttpClient.j
ava;org/apache/cactus/util/log/LogAspect.java(1k):200)
at
org.apache.cactus.client.AbstractHttpClient.doTest$ajcPostAround10(AbstractH
ttpClient.java;org/apache/cactus/util/log/LogAspect.java(1k):125)
at
org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpClient.java;o
rg/apache/cactus/util/log/LogAspect.java(1k):1221)
at
org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCase.java:456)

web.xml
    <servlet>
        <servlet-name>ServletRedirector</servlet-name>
 
<servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class
>
    </servlet>
    <servlet-mapping>
        <servlet-name>ServletRedirector</servlet-name>
        <url-pattern>/ServletRedirector</url-pattern>
    </servlet-mapping>
    
cactus.properties file

cactus.contextURL = http://localhost:8080/test
cactus.servletRedirectorName = ServletRedirector


Test file method.

    public void testLogin() throws ServletException, IOException {
        MyController servlet = new MyController();
        servlet.init(config);
        servlet.doPost(request, response);
    }
    
Any ideas?  I know I must be overlooking something obvious but I just can't
find it.










-----Original Message-----
From: Phillips Nathan [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 01, 2002 1:35 PM
To: 'Cactus Users List'
Subject: RE: Another InputStream does not contain a serialized object


Thanks for your help.  Here are my web.xml mappings:

    <servlet>
        <servlet-name>ServletRedirector</servlet-name>
 
<servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class
>
    </servlet>
    <servlet>
        <servlet-name>ServletRedirectorSecure</servlet-name>
 
<servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class
>
    </servlet>

    <servlet-mapping>
        <servlet-name>ServletRedirector</servlet-name>
        <url-pattern>/ServletRedirector/</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>ServletRedirectorSecure</servlet-name>
        <url-pattern>/ServletRedirectorSecure</url-pattern>
    </servlet-mapping> 

I guess I need to try taking the "/" off of the url-pattern for the
ServletRedirector.  I completely missed that.

-----Original Message-----
From: Vincent Massol [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 01, 2002 1:30 PM
To: 'Cactus Users List'
Subject: RE: Another InputStream does not contain a serialized object


Nathan,

Can you provide us with your web.xml to check if the mapping is
correctly defined (no trailing "/", which is no longer valid in Cactus
1.3) ?

Cactus 1.3 does not add a trailing "/" after "ServletRedirector".

This is the only potential problem that I can see.

Thanks
-Vincent

> -----Original Message-----
> From: Phillips Nathan [mailto:[EMAIL PROTECTED]]
> Sent: 31 January 2002 20:46
> To: '[EMAIL PROTECTED]'
> Subject: Another InputStream does not contain a serialized object
> 
> This is on the jakarta-cactus-23-1.3dev distribution from last night.
I
> got
> everything to work correctly under cactus 1.2 but I need the security
> stuff
> from 1.3 to use cactus in my project.  I've read the FAQ and yet
nothing I
> do seems to fix this problem.  By the way, I'm using Tomcat4.0.1.  My
> cactus.properties are:
> 
> cactus.contextURL = http://localhost:8080/test
> cactus.servletRedirectorName = ServletRedirector
> 
> I'm guessing cactus is placing the "/" after my contextURL and after
my
> servletRedirectorName so that http://localhost:8080/test/
> ServletRedirector/
> is being used in cactus 1.3.  As typing this in gives me the HTTP 500
> error
> message correctly.
> 
> I have cactus.jar placed in the lib directory of my web application
for
> the
> server.  This of course works with cactus 1.2 and Tomcat4.0.1
correctly.
> 
> I'm using the servlet2.3 jar with my 2.3 version of cactus 1.3.
> 
> I'm using Ant to execute the Junit task and my ant script is using the
> exact
> same jars that my testing web app is.
> 
> I'm completely at my wits end.  By the way, I've completely tuned off
> security on my web app.  I've researched the mailing list archive.
I'd
> appreciate any other suggestions.
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> [EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:cactus-user-
> [EMAIL PROTECTED]>
> 




--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to