Hi Kaushal, > -----Original Message----- > From: Kaushal Zagade [mailto:[EMAIL PROTECTED] > Sent: mercredi 22 d�cembre 2004 21:00 > To: Cactus Users List > Subject: Re: JSP with Cactus > > 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"); > }
Err? If you read http://jakarta.apache.org/cactus/writing/howto_jsp.html you'll see that there are 3 different types of tests that you may perform using cactus for testing your JSP page. You have to decide by yourself what you wish to test. If it's type 1 then use the example from that page... I've just noticed that your example uses the type 3 from that page. Are you sure you wish to test your JSP in isolation? Is this your goal? From what you're saying it seems to me it's not what you wish to do but you've grabbed the example from the page without understanding what it is doing... [snip] -Vincent --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
