Vincent,
I was not doing it properly. Now I am extending from
JspTestCase to test the view and it works fine now.
Thanks
Gopal
--- Vincent Massol <[EMAIL PROTECTED]> wrote:
> Gopal,
>
> Are you testing a servlet or a jsp page/taglib ? Are
> you extending
> ServletTestCase or JspTestCase ?
>
> Why are you using :
>
> public void testXXX()
> {
> _jspxFactory = JspFactory.getDefaultFactory();
> pageContext = _jspxFactory.getPageContext(servlet,
> request,
> response,"", true, 8192, true);
>
> pageContext = ...
> }
>
> instead of :
>
> public void testXXX()
> {
> pageContext = ...
> }
>
> ?
>
> Thanks
> -Vincent
>
> > -----Original Message-----
> > From: Gopal Ram [mailto:[EMAIL PROTECTED]]
> > Sent: 02 April 2002 21:57
> > To: [EMAIL PROTECTED]
> > Subject: Null
> >
> > Hi,
> >
> > I am new to Cactus. I am testing the servlet with
> > Cactus. My Servlet gets the PageContext from the
> > JSPxFactory. while doing so I am getting a
> > NullPointerException
> >
> > at
> >
>
org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.ja
> va
> > :163)
> > at
> >
>
org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.jav
> a:
> > 149)
> > at
> >
>
org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.j
> av
> > a:99)
> >
> > Here is the Code Snippet which trows the exception
> >
> > _jspxFactory =
> JspFactory.getDefaultFactory();
> >
> >
>
response.setContentType("text/html;charset=ISO-8859-1");
> > pageContext =
> > _jspxFactory.getPageContext(servlet, request,
> > response,"", true, 8192, true);
> >
> > application =
> pageContext.getServletContext();
> > config = pageContext.getServletConfig();
> > session = pageContext.getSession();
> > out = pageContext.getOut();
> > writer =
> pageContext.getResponse().getWriter();
> >
> > My question how do I set the pageContext I have in
> the
> > Cactus client side. Please help..
> >
> > Thanks
> > gram
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Tax Center - online filing with TurboTax
> > http://http://taxes.yahoo.com/
> >
> > --
> > To unsubscribe, e-mail: <mailto:cactus-user-
> > [EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:cactus-user-
> > [EMAIL PROTECTED]>
> >
>
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>