You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Pete Butler <pb...@cerebellumsoft.com> on 2002/04/12 21:38:00 UTC
HTTP 405 Error with cactus and HPAS
I found a very similar question in the archives, but since I can't find any
evidence it was answered, I'd like to ask it again since I'm having the
same problem.
(The e-mail I'm referring to was posted 2/21/02 by Terrence C. McDermond
and has the same subject line as above.)
I'm using Hewlett Packerd's application server (HP-AS), and would like to
do some unit testing with Cactus. Unfortunately, I get the following error
when I run TestRunner, I wind up with the following stack trace:
java.io.IOException: Server returned HTTP response code: 405 for URL:
http://localhost:9090/immigration/ServletRedirector/
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at
org.apache.cactus.client.AutoReadHttpURLConnection.getInputStream(AutoReadHttpURLConnection.java:127)
at
org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpClient.java:136)
at
org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCase.java:422)
at org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:130)
at org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:371)
The code I'm using for this is dirt simple:
import java.util.*;
import java.lang.reflect.*;
import org.apache.log4j.*;
import java.sql.Timestamp;
import org.apache.regexp.*;
import org.apache.cactus.*;
import junit.framework.*;
public class SimpleTest extends ServletTestCase {
public SimpleTest(String name) {
super(name);
}
public void testTrue() {
assertEquals("fish", "fish");
}
public static Test suite()
{
return new TestSuite(SimpleTest.class);
}
}
Could anybody offer any insight into what's likely to be causing this? And
has anybody successfully used Cactus with HP-AS?
Thanks.
-- Pete Butler
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: HTTP 405 Error with cactus and HPAS
Posted by Pete Butler <pb...@cerebellumsoft.com>.
Vincent,
Option 2/ did the trick; everything's running smoothly now.
Thank you VERY much.
-- Pete Butler
At 11:12 PM 4/12/2002 +0100, you wrote:
>Pete,
>
>Several questions :
>1/ Are you sure your webapp context is "immigration" ?
>2/ Can you try without specifying a trailing "/" in cactus.properties
>and making sure that the mapping in web.xml matches that (i.e. no
>trailing slash).
>
>Thanks
>-Vincent
>
> > -----Original Message-----
> > From: Pete Butler [mailto:pbutler@cerebellumsoft.com]
> > Sent: 12 April 2002 20:38
> > To: cactus-user@jakarta.apache.org
> > Subject: HTTP 405 Error with cactus and HPAS
> >
> > I found a very similar question in the archives, but since I can't
>find
> > any
> > evidence it was answered, I'd like to ask it again since I'm having
>the
> > same problem.
> >
> > (The e-mail I'm referring to was posted 2/21/02 by Terrence C.
>McDermond
> > and has the same subject line as above.)
> >
> > I'm using Hewlett Packerd's application server (HP-AS), and would like
>to
> > do some unit testing with Cactus. Unfortunately, I get the following
> > error
> > when I run TestRunner, I wind up with the following stack trace:
> >
> > java.io.IOException: Server returned HTTP response code: 405 for URL:
> > http://localhost:9090/immigration/ServletRedirector/
> >
> > at
> > sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
>Source)
> >
> > at
> >
>org.apache.cactus.client.AutoReadHttpURLConnection.getInputStream(AutoRe
>ad
> > HttpURLConnection.java:127)
> >
> > at
> >
>org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpClient.ja
>va
> > :136)
> >
> > at
> >
>org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCase.java:
>42
> > 2)
> >
> > at
> > org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:130)
> >
> > at
> > org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:371)
> >
> >
> >
> > The code I'm using for this is dirt simple:
> >
> >
> >
> > import java.util.*;
> > import java.lang.reflect.*;
> > import org.apache.log4j.*;
> > import java.sql.Timestamp;
> > import org.apache.regexp.*;
> > import org.apache.cactus.*;
> > import junit.framework.*;
> >
> > public class SimpleTest extends ServletTestCase {
> >
> >
> > public SimpleTest(String name) {
> > super(name);
> > }
> >
> > public void testTrue() {
> > assertEquals("fish", "fish");
> > }
> >
> > public static Test suite()
> > {
> > return new TestSuite(SimpleTest.class);
> > }
> > }
> >
> >
> >
> > Could anybody offer any insight into what's likely to be causing this?
> > And
> > has anybody successfully used Cactus with HP-AS?
> >
> > Thanks.
> >
> > -- Pete Butler
> >
> >
> > --
> > To unsubscribe, e-mail: <mailto:cactus-user->
> unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:cactus-user->
> help@jakarta.apache.org>
> >
>
>
>
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: HTTP 405 Error with cactus and HPAS
Posted by Vincent Massol <vm...@octo.com>.
Pete,
Several questions :
1/ Are you sure your webapp context is "immigration" ?
2/ Can you try without specifying a trailing "/" in cactus.properties
and making sure that the mapping in web.xml matches that (i.e. no
trailing slash).
Thanks
-Vincent
> -----Original Message-----
> From: Pete Butler [mailto:pbutler@cerebellumsoft.com]
> Sent: 12 April 2002 20:38
> To: cactus-user@jakarta.apache.org
> Subject: HTTP 405 Error with cactus and HPAS
>
> I found a very similar question in the archives, but since I can't
find
> any
> evidence it was answered, I'd like to ask it again since I'm having
the
> same problem.
>
> (The e-mail I'm referring to was posted 2/21/02 by Terrence C.
McDermond
> and has the same subject line as above.)
>
> I'm using Hewlett Packerd's application server (HP-AS), and would like
to
> do some unit testing with Cactus. Unfortunately, I get the following
> error
> when I run TestRunner, I wind up with the following stack trace:
>
> java.io.IOException: Server returned HTTP response code: 405 for URL:
> http://localhost:9090/immigration/ServletRedirector/
>
> at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
>
> at
>
org.apache.cactus.client.AutoReadHttpURLConnection.getInputStream(AutoRe
ad
> HttpURLConnection.java:127)
>
> at
>
org.apache.cactus.client.AbstractHttpClient.doTest(AbstractHttpClient.ja
va
> :136)
>
> at
>
org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCase.java:
42
> 2)
>
> at
> org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:130)
>
> at
> org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:371)
>
>
>
> The code I'm using for this is dirt simple:
>
>
>
> import java.util.*;
> import java.lang.reflect.*;
> import org.apache.log4j.*;
> import java.sql.Timestamp;
> import org.apache.regexp.*;
> import org.apache.cactus.*;
> import junit.framework.*;
>
> public class SimpleTest extends ServletTestCase {
>
>
> public SimpleTest(String name) {
> super(name);
> }
>
> public void testTrue() {
> assertEquals("fish", "fish");
> }
>
> public static Test suite()
> {
> return new TestSuite(SimpleTest.class);
> }
> }
>
>
>
> Could anybody offer any insight into what's likely to be causing this?
> And
> has anybody successfully used Cactus with HP-AS?
>
> Thanks.
>
> -- Pete Butler
>
>
> --
> To unsubscribe, e-mail: <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>