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 Leandro Rodrigo Saad Cruz <le...@ibnetwork.com.br> on 2002/02/06 18:32:36 UTC

trying to make cactus hit an URL

Hi all
I'm trying to make cactus hit an url to test MyServlet.
Here is what I did

public void beginXXX(WebRequest theRequest)
{
	theRequest.setURL("host","/context","/servlet/main","/pathinfo",query");
}

wouldn't this be enought to make ServletRedirector hi
http://host/context/servlet/main/pathinfo?query ??


-- 
Leandro Rodrigo Saad Cruz
IT - Inter Business Tecnologia e Servicos (IB)
http://www.ibnetwork.com.br


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


RE: trying to make cactus hit an URL

Posted by Nicholas Lesiecki <ni...@eblox.com>.
This is not really how cactus is supposed to be used. If you're lookign to
test your web application externally, you should consider:

http://httpunit.sourceforge.net/

If you would like to test individual methods and classes in your app, check
out:

http://jakarta.apache.org/cactus/getting_started.html

Which will get you started on the Cactus methodology.

Cheers,

Nicholas Lesiecki
Principal Software Engineer
eBlox, Inc.
(520) 615-9345 x104
Check out my new book!:
Java Tools for Extreme Programming: Mastering Open Source Tools, including
Ant, JUnit, and Cactus

http://www.amazon.com/exec/obidos/ASIN/047120708X/

Check out my article on AspectJ:
http://www-106.ibm.com/developerworks/java/?loc=dwmain

-----Original Message-----
From: Leandro Rodrigo Saad Cruz [mailto:leandro@ibnetwork.com.br]
Sent: Wednesday, February 06, 2002 10:33 AM
To: Cactus Users List
Subject: trying to make cactus hit an URL


Hi all
I'm trying to make cactus hit an url to test MyServlet.
Here is what I did

public void beginXXX(WebRequest theRequest)
{
	theRequest.setURL("host","/context","/servlet/main","/pathinfo",query");
}

wouldn't this be enought to make ServletRedirector hi
http://host/context/servlet/main/pathinfo?query ??


--
Leandro Rodrigo Saad Cruz
IT - Inter Business Tecnologia e Servicos (IB)
http://www.ibnetwork.com.br


--
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: trying to make cactus hit an URL

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

> -----Original Message-----
> From: Leandro Rodrigo Saad Cruz [mailto:leandro@ibnetwork.com.br]
> Sent: 06 February 2002 17:33
> To: Cactus Users List
> Subject: trying to make cactus hit an URL
> 
> Hi all
> I'm trying to make cactus hit an url to test MyServlet.

That's not the way it works ...

> Here is what I did
> 
> public void beginXXX(WebRequest theRequest)
> {
>
theRequest.setURL("host","/context","/servlet/main","/pathinfo",quer
> y");
> }
> 
> wouldn't this be enought to make ServletRedirector hi
> http://host/context/servlet/main/pathinfo?query ??
> 

nope ... ;-)

All requests go through the Cactus redirector servlet which in turn call
your method to test. See
http://jakarta.apache.org/cactus/how_it_works.html for details.

Thanks
-Vincent

> 
> --
> Leandro Rodrigo Saad Cruz
> IT - Inter Business Tecnologia e Servicos (IB)
> http://www.ibnetwork.com.br
> 
> 
> --
> 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>