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 devasish sarangi <de...@yahoo.com> on 2002/04/12 21:50:27 UTC

Trouble running the sample

Hi,

I am getting a weird error when trying to run the
Sample provided from Cactus site. For simplicity, I am
running just one testcase called TestSampleServlet.
The error is

java.io.FileNotFoundException:
http://localhost:8080/test/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)


But hold on to your seat, I am getting this error for
ONE, just one method i.e. testRequestDispatcher. If I
comment it, the testcase suite runs smooth. As I
understand, I believe that for running any test
method, Cactus would use the URL
http://localhost:8080/test/ServletRedirector/

So why is it failing for just one method? I guess this
question may be more for Vincent, because I see his
name as the author--:)--
It may because of some setting problems too. Please
let me know your thoughts.

Thanks,
Devasish

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Trouble running the sample

Posted by Vincent Massol <vm...@octo.com>.
Devasish,

Can you try to change your cactus.properties so that there is no
trailing "/" in your URLs, and ensure that your web.xml matches that.

-Vincent

> -----Original Message-----
> From: devasish sarangi [mailto:devasishsarangi@yahoo.com]
> Sent: 13 April 2002 20:49
> To: Cactus Users List
> Subject: RE: Trouble running the sample
> 
> Vincent,
> 
> I have test.jsp in the appropriate place. Yes, when I
> dig deep into the code, I found that doForward method
> calls test/test.jsp. But I already had the test.jsp
> file in its place(I can access through browser).
> 
> Moreover, the FileNotFoundException is coming for
> http://localhost:8080/test/ServletRedirector/
> 
> If test.jsp is missing, I should have got an error
> message containing 'test.jsp' . But from the above
> message it seems that for some reason its not able to
> find the ServletRedirector. Again, this seems
> unlikely.
> 
> I will keep up my experimentation, if you have any
> ideas please let me know.
> 
> Thank you for a prompt reply, I appreciate it.
> Devasish
> 
> --- Vincent Massol <vm...@octo.com> wrote:
> > Devasish,
> >
> > The reason is simple : you have only taken one part
> > of the sample
> > application (which is the java code) but have not
> > taken the needed jsp
> > file. In other words, if you read the code for
> > testRequestDispatcher
> > you'll find that it tries to call a test/test.jsp
> > file, which the Cactus
> > redirector cannot find and reports a 404, which one
> > the client side is
> > reported as a FileNotFoundException.
> >
> > Thanks
> > -Vincent
> >
> > > -----Original Message-----
> > > From: devasish sarangi
> > [mailto:devasishsarangi@yahoo.com]
> > > Sent: 12 April 2002 20:50
> > > To: cactus-user@jakarta.apache.org
> > > Subject: Trouble running the sample
> > >
> > > Hi,
> > >
> > > I am getting a weird error when trying to run the
> > > Sample provided from Cactus site. For simplicity,
> > I am
> > > running just one testcase called
> > TestSampleServlet.
> > > The error is
> > >
> > > java.io.FileNotFoundException:
> > > http://localhost:8080/test/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)
> > >
> > >
> > > But hold on to your seat, I am getting this error
> > for
> > > ONE, just one method i.e. testRequestDispatcher.
> > If I
> > > comment it, the testcase suite runs smooth. As I
> > > understand, I believe that for running any test
> > > method, Cactus would use the URL
> > > http://localhost:8080/test/ServletRedirector/
> > >
> > > So why is it failing for just one method? I guess
> > this
> > > question may be more for Vincent, because I see
> > his
> > > name as the author--:)--
> > > It may because of some setting problems too.
> > Please
> > > let me know your thoughts.
> > >
> > > Thanks,
> > > Devasish
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Yahoo! Tax Center - online filing with TurboTax
> > > http://taxes.yahoo.com/
> > >
> > > --
> > > 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>
> >
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
> 
> --
> 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>


RE: Trouble running the sample

Posted by devasish sarangi <de...@yahoo.com>.
Vincent,

I have test.jsp in the appropriate place. Yes, when I
dig deep into the code, I found that doForward method
calls test/test.jsp. But I already had the test.jsp
file in its place(I can access through browser).

Moreover, the FileNotFoundException is coming for
http://localhost:8080/test/ServletRedirector/

If test.jsp is missing, I should have got an error
message containing 'test.jsp' . But from the above
message it seems that for some reason its not able to
find the ServletRedirector. Again, this seems
unlikely.

I will keep up my experimentation, if you have any
ideas please let me know.

Thank you for a prompt reply, I appreciate it.
Devasish

--- Vincent Massol <vm...@octo.com> wrote:
> Devasish,
> 
> The reason is simple : you have only taken one part
> of the sample
> application (which is the java code) but have not
> taken the needed jsp
> file. In other words, if you read the code for
> testRequestDispatcher
> you'll find that it tries to call a test/test.jsp
> file, which the Cactus
> redirector cannot find and reports a 404, which one
> the client side is
> reported as a FileNotFoundException.
> 
> Thanks
> -Vincent
> 
> > -----Original Message-----
> > From: devasish sarangi
> [mailto:devasishsarangi@yahoo.com]
> > Sent: 12 April 2002 20:50
> > To: cactus-user@jakarta.apache.org
> > Subject: Trouble running the sample
> > 
> > Hi,
> > 
> > I am getting a weird error when trying to run the
> > Sample provided from Cactus site. For simplicity,
> I am
> > running just one testcase called
> TestSampleServlet.
> > The error is
> > 
> > java.io.FileNotFoundException:
> > http://localhost:8080/test/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)
> > 
> > 
> > But hold on to your seat, I am getting this error
> for
> > ONE, just one method i.e. testRequestDispatcher.
> If I
> > comment it, the testcase suite runs smooth. As I
> > understand, I believe that for running any test
> > method, Cactus would use the URL
> > http://localhost:8080/test/ServletRedirector/
> > 
> > So why is it failing for just one method? I guess
> this
> > question may be more for Vincent, because I see
> his
> > name as the author--:)--
> > It may because of some setting problems too.
> Please
> > let me know your thoughts.
> > 
> > Thanks,
> > Devasish
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Tax Center - online filing with TurboTax
> > http://taxes.yahoo.com/
> > 
> > --
> > 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>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Trouble running the sample

Posted by Vincent Massol <vm...@octo.com>.
Devasish,

The reason is simple : you have only taken one part of the sample
application (which is the java code) but have not taken the needed jsp
file. In other words, if you read the code for testRequestDispatcher
you'll find that it tries to call a test/test.jsp file, which the Cactus
redirector cannot find and reports a 404, which one the client side is
reported as a FileNotFoundException.

Thanks
-Vincent

> -----Original Message-----
> From: devasish sarangi [mailto:devasishsarangi@yahoo.com]
> Sent: 12 April 2002 20:50
> To: cactus-user@jakarta.apache.org
> Subject: Trouble running the sample
> 
> Hi,
> 
> I am getting a weird error when trying to run the
> Sample provided from Cactus site. For simplicity, I am
> running just one testcase called TestSampleServlet.
> The error is
> 
> java.io.FileNotFoundException:
> http://localhost:8080/test/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)
> 
> 
> But hold on to your seat, I am getting this error for
> ONE, just one method i.e. testRequestDispatcher. If I
> comment it, the testcase suite runs smooth. As I
> understand, I believe that for running any test
> method, Cactus would use the URL
> http://localhost:8080/test/ServletRedirector/
> 
> So why is it failing for just one method? I guess this
> question may be more for Vincent, because I see his
> name as the author--:)--
> It may because of some setting problems too. Please
> let me know your thoughts.
> 
> Thanks,
> Devasish
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
> 
> --
> 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>