tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Radim Kubacki <radim.kuba...@sun.com>
Subject Re: JSP won't work unless have package in taglib .java file
Date Sun, 06 Apr 2003 15:42:23 GMT
David Thielen wrote:
> Hi;
> 
> If I have a tld object (ie TemplateDesc.java) with no project and place it
> in WEB-INF/classes - it won't work. But if I give it a package name and
> place it in WEB-INF/classes/package - then it works.
> 
> The problem seems to be that with no package it generates the code:
>     TemplateDesc _jspx_th_tl_TP_0 = (TemplateDesc)
> _jspx_tagPool_tl_TP.get(com.windwardreports.TemplateDesc.class);
> 
> but with the package it generates:
>     com.windwardreports.TemplateDesc _jspx_th_tl_TP_0 =
> (com.windwardreports.TemplateDesc)
> _jspx_tagPool_tl_TP.get(com.windwardreports.TemplateDesc.class);
> 
> which makes sense. But why can it find it as part of a package but not with
> no package?
> 
Since JDK1.4 the compiler rejects import statements that import a type 
from the unnamed namespace. See 
http://java.sun.com/j2se/1.4/compatibility.html (section 8 of 
incompatibilies).

Simply don't use unnamed namespace.

Radim

> thanks - dave
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message