You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nick Chalko <Ni...@planetU.com> on 2001/07/11 19:34:35 UTC

RE: null pointer error

This turned out to be a IBM WTE bug.  
 
The trick is all web apps must use JSP 1.1
Thanks to Amit for the answer.
-------------   Here is what Amit said --------------
Yes I did find a workaround the problem.  The believe this is a bug is in
the servlet engine.
You need to change the webapp config file for ALL the webapps in your system
to use jsp 1.1
compiler.  Just changing the default_app.webapp to jsp 1.1 is not enough.
VAJ seems to get
confused if it encounters any webapp config file which does not specify jsp
1.1 compiler.  Its either
all or nothing.  
 
Please refer to the following email exchange I had with another person who
inquired about the same problem.
 
Hope it helps.
 
Good luck,
 
Amit
 
----------------------------------------------------------------------------
---------------------------------------------------------------------------
Thank you!  It works now!  That's a bad bug.  I was working in a custom
webapp, but I guess you need to change all of the webapps to 1.1.  

Thanks again,
Roger

-----Original Message-----
From: Amit Verma [ mailto:averma@emtera.com <ma...@emtera.com> ]
Sent: Wednesday, June 27, 2001 10:38 AM
To: Endo, Roger
Subject: Re: Taglib problem with VAJ 3.5.3


You might want to check all of your webapp files, that is for all the
different webapps.  In my
case even though the default_app.webapp for set properly there was a webapp
for another app
which was using JSP 1.0 which confused the servlet engine.  I changed all my
webapps to use
JSP1.1 which fixed the problem.

Amit


----- Original Message -----
From: Endo, Roger < rendo@amgen.com <ma...@amgen.com> >
To: 'Amit Verma' < averma@emtera.com <ma...@emtera.com> >
Sent: Wednesday, June 27, 2001 1:14 PM
Subject: RE: Taglib problem with VAJ 3.5.3


> Thank you for you quick reply.  Unfortunately I am already running JSP
1.1.
> Taglibs work except for ones which implement BodyTag, where I get the null
> "out" stream.
>
> Thanks,
> Roger
>
> -----Original Message-----
> From: Amit Verma [ mailto:averma@emtera.com <ma...@emtera.com> ]
> Sent: Wednesday, June 27, 2001 10:09 AM
> To: Endo, Roger
> Subject: Re: Taglib problem with VAJ 3.5.3
>
>
> Yes Roger, I did find solution to the problem.  The problem stemmed from
> choice of JSP compiler specified in the webapp config file.  Make sure you
> edit the default_app.webapp file to use jsp1.1 compiler which is
>
>       <code>com.ibm.ivj.jsp.jasper.runtime.JspDebugServlet</code>
>
> By default IBM uses Jsp1.0 compiler.  The default webapp file on  my
> computer was under       F:\IBMVJava3.5\ide\project_resources\IBM
WebSphere
> Test Environment\hosts\default_host\default_app\servlets
>
> If you have multiple web apps then make sure you edit each one of the
webapp
> config file to specify JSP 1.1 compiler.
> You will obviously have to restart the servlet engine.  And it should
work.
>
> Hope it helps.
>
> Good luck,
>
> Amit
>
> ----- Original Message -----
> From: Endo, Roger < rendo@amgen.com <ma...@amgen.com> >
> To: < averma@emtera.com <ma...@emtera.com> >
> Sent: Wednesday, June 27, 2001 12:44 PM
> Subject: Re: Taglib problem with VAJ 3.5.3
>
>
> > Hello - I saw your posting regarding the taglib with BodyTag problem in
> VAJ
> > 3.5.3.  I have the same problem.  Did you find a solution?
> >
> > Thanks,
> > Roger

----- Original Message ----- 
From: Nick Chalko <ma...@planetU.com>  
To: 'averma@emtera.com' <mailto:'averma@emtera.com'>  
Sent: Tuesday, July 10, 2001 9:19 PM
Subject: re:having problem with using tag libraries with a body under VAJ

Did you ever find a fix for this problem.
 
I'm having problem with using tag libraries with a body under VAJ
3.5.3 and WTE.  The tag library does not work when there is body.  It
throws a NullPointerException from the jsp generated servlet code. 
The specific line of code where the problem occurs is
out = pageContext.pushBody();
The JspWriter, out is returned as null.  Subsequent call to out.print
fails with a null pointer exception.  Has anybody encountered this
problem?  Keep in mind that the problem only occurs using tag
libraries with a body (i.e. your tag class extends BodyTagSupport).