You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Fan, Hong" <Ho...@gs.com> on 2003/06/10 16:47:53 UTC
nullpointer when precompile jsp with tag
Hi
I tried to precompile a jsp page which uses tags using ant jspc task
documented in tomcat 4.1.24, but it generated nullpointer exception. I
believe there is similar post regarding the same problem. Does any one know
the cause?
Thanks
http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg91565.html
<http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg91565.html>
Hi.
My project has jsps, some of which use jstl/jakarta taglibs.
I use ant to pre-compile/compile my jsps manually. All jsps which dont use
taglibs still precompile/compile happily. However jsps with jstl/taglibs do
NOT compile with ant because of some nullpointer exception:
jsp_precompile:
[jspc] Compiling 64 source
filesC:\jakarta\tomcat\work\Standalone\localhost\northstar
[jasperc] 2003-03-31 04:08:57 - ERROR-the file
'\Accounting\GL\Budgets\budgetSetupWizard\budgetList.jsp' generated the
following general exception: java.lang.NullPointerException
[jasperc] error:org.apache.jasper.JasperException: Error compiling
\Accounting\GL\Budgets\budgetSetupWizard\budgetList.jsp
[jasperc] at org.apache.jasper.JspC.processFile(JspC.java:596)
[jasperc] at org.apache.jasper.JspC.execute(JspC.java:800)
[jasperc] at org.apache.jasper.JspC.main(JspC.java:822)
[jasperc] Java Result: 9
The interesting thing is that these same jsps run with no problem on tomcat,
i.e. tomcat will precompile/compile them at run time and they work fine....
Does anyone know whats going on? How can I get Ant to do the precompile.
I posted this on the ant-user list thinking it was an Ant problem. However,
it seems like it is more of a jasper/tomcat issue.... My message on the
ant-user list and its reply:
http://marc.theaimsgroup.com/?t=104915758600001
<http://marc.theaimsgroup.com/?t=104915758600001&r=1&w=2> &r=1&w=2
My environment:
ant 1.5.2
tomcat 4.1.21
taglibs 1.0
jdk 1.4.1_01
Thanks.
Hammad.
<http://www.mail-archive.com/tomcat-user@jakarta.apache.org/msg91565.html>
Re: nullpointer when precompile jsp with tag
Posted by Johann Uhrmann <jo...@xpecto.com>.
Hi,
I have a hint on that issue:
The jasper compiler crashes if the TLD contains a <variable>-section.
In my case, commenting out the following section from my TLD
made jasper run without any errors:
<variable>
<name-from-attribute>var</name-from-attribute>
<variable-class>java.lang.Boolean</variable-class>
<declare>true</declare>
<scope>NESTED</scope>
<description>Variable that becomes true if the tag body is
evaluated.</description>
</variable>
Can someone please verify that?
Thanks,
Hans
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org