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 chad r <ch...@yahoo.com> on 2002/03/27 07:35:45 UTC

Installation Problems

Hi,

I am having a lot of problems installing cactus. I am using Tomcat and I don't want to use Ant, just run my tests manually from JUnit. I am listing my questions, please answer each one of them. Thanks in advance

1.) In Tomcat I don't find any WEB-INF/lib directory to put the commons-cactus.jar file. Should I create a lib folder in WEB-INF and then put this jar file?

2.) Is the Web.xml file need to appeneded with what I find in the documentation, or do I need to replace it. Also are u talking about xml file in \tomcat\webapps\examples\WEB-INF\web.xml. I want to test only servlet programs, do I need to bother about filters and JSP part in xml file or can I not put that in xml file

3.) The documentation says "if the webapp is called mywebapp then URL in cactus.properties should be

http://localhost:8080/mywebapp/ServletRedirector" What do u mean by webapp actually. I want to test my servlet, is it the webapp or do we need to create any folder called webapp? If so where do we need to put that

4.) Do I need to write explicit setUp() and tearDown() methods in the testclass.

Please reply as soon as possible

cheers

chad



---------------------------------
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�

RE: mail list

Posted by Vincent Massol <vm...@octo.com>.
Yes, you can ! ;-)

> -----Original Message-----
> From: Achernov [mailto:andrey_chernov@yahoo.com]
> Sent: 27 March 2002 17:47
> To: Cactus Users List
> Subject: mail list
> 
> I can not send questions on Cactus mail list
> 
> You will not prompt that I should make that I could send the questions
> 
> Best regards  Chernov Andrei
> andrey_chernov@yahoo.com
> 
> 
> 
> _________________________________________________________
> 
> Do You Yahoo!?
> 
> Get your free @yahoo.com address at http://mail.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>


mail list

Posted by Achernov <an...@yahoo.com>.
I can not send questions on Cactus mail list 

You will not prompt that I should make that I could send the questions 

Best regards  Chernov Andrei
andrey_chernov@yahoo.com


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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


RE: is this true?

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

Please have a look as the provided sample application (in sample/
directory where you unzipped the Cactus distribution). You'll see the
kind of tests you can perform with Cactus.

WRT database access and any other API, Cactus is completely transparent,
meaning there is no interception of any sort (your database will get
called). The only interception Cactus does (and which is a transparent
interception - if you exclude possible bugs :-)) is with the Servlet and
Filter APIs.

In other words, with a Cactus test you decide of your entry point in
your application to test and it goes all the way at the back (till the
database or even calling other remote resources such as some CICS
transactions on a mainframe or other partners, etc).

If you wish not to go all the way, you can combine a mockobjects
strategy with Cactus.

Hope it helps,
-Vincent

> -----Original Message-----
> From: chad r [mailto:chad123usus@yahoo.com]
> Sent: 28 March 2002 15:14
> To: cactus-user@jakarta.apache.org
> Subject: is this true?
> 
> 
> 
>   Hi,
> Is Cactus only for testing the cookie and session objects? Can't we
test
> some code for example some
> database code in the servlet? Is it possible with the present cactus
> structure to invoke database and get result? Do we need to make any
> changes ?
> Thanks
> chad
> 
> 
> 
> 
> ---------------------------------
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy AwardsR



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


is this true?

Posted by chad r <ch...@yahoo.com>.
 
  Hi,
Is Cactus only for testing the cookie and session objects? Can't we test some code for example some 
database code in the servlet? Is it possible with the present cactus structure to invoke database and get result? Do we need to make any changes ?
Thanks
chad




---------------------------------
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�

RE: Installation Problems

Posted by chad r <ch...@yahoo.com>.
 Hi,
Thanks very much for your help. Indeed I was missing the webapp part completely. I have another question. Is Cactus only for testing the cookie and session objects? Can't we test some code for example some database code in the servlet? Is it possible with the present cactus structure to invoke database and get result? Do we need t o make any changes ?
Thanks
chad
  Vincent Massol <vm...@octo.com> wrote: Chad,

It seems you're missing a complete part of the Servlet spec, which is
the notion of WebApp. It is the way to package an application and is the
common and standard way of deploying an application. I would suggest you
do some reading (just download the servlet spec for example or find a
tutorial on javaworld) and then if you still have some additional
questions, come back here, and we will answer then with pleasure.

See some comments inline below.

> -----Original Message-----
> From: chad r [mailto:chad123usus@yahoo.com]
> Sent: 27 March 2002 06:36
> To: cactus-user@jakarta.apache.org
> Subject: Installation Problems
> 
> 
> Hi,
> 
> I am having a lot of problems installing cactus. I am using Tomcat and
I
> don't want to use Ant, just run my tests manually from JUnit. I am
listing
> my questions, please answer each one of them. Thanks in advance
> 
> 1.) In Tomcat I don't find any WEB-INF/lib directory to put the
commons-
> cactus.jar file. Should I create a lib folder in WEB-INF and then put
this
> jar file?
> 

webapps are put in tomcat_home/webapps under Tomcat

> 2.) Is the Web.xml file need to appeneded with what I find in the
> documentation, or do I need to replace it. Also are u talking about
xml
> file in \tomcat\webapps\examples\WEB-INF\web.xml. I want to test only
> servlet programs, do I need to bother about filters and JSP part in
xml
> file or can I not put that in xml file
> 

this belongs to your webapp (see servlet spec).

> 3.) The documentation says "if the webapp is called mywebapp then URL
in
> cactus.properties should be
> 
> http://localhost:8080/mywebapp/ServletRedirector" What do u mean by
webapp
> actually. 

I mean the webapp context (which is usually the name of the webapp war
file).

> I want to test my servlet, is it the webapp or do we need to
> create any folder called webapp? If so where do we need to put that
> 
> 4.) Do I need to write explicit setUp() and tearDown() methods in the
> testclass.
> 

setUp() and teardown() work in the same way as for JUnit except that
they are executed on the server side.

> Please reply as soon as possible
> 
> cheers
> 
> chad
> 

Thanks
-Vincent



--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�

RE: Installation Problems

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

It seems you're missing a complete part of the Servlet spec, which is
the notion of WebApp. It is the way to package an application and is the
common and standard way of deploying an application. I would suggest you
do some reading (just download the servlet spec for example or find a
tutorial on javaworld) and then if you still have some additional
questions, come back here, and we will answer then with pleasure.

See some comments inline below.

> -----Original Message-----
> From: chad r [mailto:chad123usus@yahoo.com]
> Sent: 27 March 2002 06:36
> To: cactus-user@jakarta.apache.org
> Subject: Installation Problems
> 
> 
> Hi,
> 
> I am having a lot of problems installing cactus. I am using Tomcat and
I
> don't want to use Ant, just run my tests manually from JUnit. I am
listing
> my questions, please answer each one of them. Thanks in advance
> 
> 1.) In Tomcat I don't find any WEB-INF/lib directory to put the
commons-
> cactus.jar file. Should I create a lib folder in WEB-INF and then put
this
> jar file?
> 

webapps are put in tomcat_home/webapps under Tomcat

> 2.) Is the Web.xml file need to appeneded with what I find in the
> documentation, or do I need to replace it. Also are u talking about
xml
> file in \tomcat\webapps\examples\WEB-INF\web.xml. I want to test only
> servlet programs, do I need to bother about filters and JSP part in
xml
> file or can I not put that in xml file
> 

this belongs to your webapp (see servlet spec).

> 3.) The documentation says "if the webapp is called mywebapp then URL
in
> cactus.properties should be
> 
> http://localhost:8080/mywebapp/ServletRedirector" What do u mean by
webapp
> actually. 

I mean the webapp context (which is usually the name of the webapp war
file).

> I want to test my servlet, is it the webapp or do we need to
> create any folder called webapp? If so where do we need to put that
> 
> 4.) Do I need to write explicit setUp() and tearDown() methods in the
> testclass.
> 

setUp() and teardown() work in the same way as for JUnit except that
they are executed on the server side.

> Please reply as soon as possible
> 
> cheers
> 
> chad
> 

Thanks
-Vincent



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