jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kaushal Zagade <zag...@gmail.com>
Subject Re: JSP with Cactus
Date Wed, 22 Dec 2004 20:00:27 GMT
hi vincent,

i apologise for my second e-mail and thank you for trying to help me.

i have read the document you mentioned carefully before writing my
previous mail. about the EJB, i mentioned it because, i have tested a
EJB with cactus in a prior project. so i wanted to tell you that i
know the basics of cactus.

but for this new project i am testing a simple JSP. i am using WSAD 5.1.2.
i have a web project, which has my JSP. i have a TestCase.Java which extends 
JspTestCase. in this class i want have a method, testXXX(), but here
is the problem. what should be the XXX ? there is no method in the
JSP. so i wrote a bean. which set a "name" variable. this variable is
displayed in the JSP.

so my test case looks like:
public void testSetName()
{
PageBean bean = new PageBean();
bean.setName("kevin");
request.setAttribute("pageBean", bean);
pageContext.forward("/test.jsp");
}

=====

my bean has a method, setName().

is this right ? how do i run the cactus test here ? i have all the jar
files in place and the cactus.properties file. i right click on the
java file(TestCase.java) and select java app or junit. it says Failed
to get the test results at the server URL.

Kaushal


 
On Wed, 22 Dec 2004 08:47:41 +0100, Vincent Massol <vmassol@pivolis.com> wrote:
> Oh, I forgot to say that you've overspent your quota of questions! ;-) (7
> question emails or so in 3 days).
> 
> What would be nice would be to set up some quota system (say allow 3
> questions to be asked) and then to be able to ask again you'll have to
> answer some other questions asked on the list... That would be cool ;-)
> 
> -Vincent
> 
> PS: Sorry for my bad temper but I really got annoyed by your "urgent"
> questions the fact that you're posting several times the same question and
> by the fact that you have obviously not taken the time to read any doc
> before starting asking questions...
> 
> > -----Original Message-----
> > From: Vincent Massol [mailto:vmassol@pivolis.com]
> > Sent: mercredi 22 d├ęcembre 2004 08:45
> > To: 'Cactus Users List'
> > Subject: RE: JSP with Cactus
> >
> > Hi,
> >
> > > -----Original Message-----
> > > From: Kaushal Zagade [mailto:zagade@gmail.com]
> > > Sent: mercredi 22 d├ęcembre 2004 03:45
> > > To: Cactus Users List
> > > Subject: JSP with Cactus
> > >
> > > hi,
> > >
> > > i am really stuck on this issue. i am wanting to test a simple JSP with
> > > cactus.
> > >
> > > i am getting the following error:
> > >
> > > org.apache.cactus.util.ChainedRuntimeException: Failed to get the test
> > > results at [http://localhost:9080/CactusJSP/JspRedirector]
> > >
> > > i have tested this EJB with ServletRedirector.
> >
> > What EJB? I don't see any EJB in your email. I thought you were trying to
> > test JSP...
> >
> > [snip]
> >
> > > can anybody suggest how a JSP can be tested. i do not want to test JSP
> > > tag libs, just plain JSP.....
> >
> > I suggest you read the doc that we have painstakingly written... ;-) Let
> > us
> > know if it's not good enough and what can be improved
> > (http://jakarta.apache.org/cactus/writing/howto_jsp.html).
> >
> > > set and get property methods.
> >
> > AFAIK a JSP does *not* have get and set methods. Are you sure you wish to
> > test a JSP?
> >
> > >
> > > what testcases should be in the client project ? i am really confused.
> >
> > I don't know what you call a client project.
> >
> > I'd suggest you start reading all the doc on the Cactus web site and let
> > us
> > know what and where it is not clear so that we can improve it.
> >
> > >
> > > please help as this is very urgent for me.
> >
> > Mentioning it's urgent doesn't help. Sorry.
> >
> > Cheers,
> > -Vincent
> >
> > PS: Please do not send several times the same email. You won't get an
> > answer
> > faster. I can tell you there's nothing more irritating than someone saying
> > that his question is urgent and sending several times the same email. All
> > the people here are NOT paid for answering your emails and they do this on
> > their free time.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
>

Mime
View raw message