jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: Null
Date Sun, 14 Apr 2002 19:14:06 GMT
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:gramanuj2001@yahoo.com]
> Sent: 02 April 2002 21:57
> To: cactus-user@jakarta.apache.org
> 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-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>
> 




--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message