You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by David Thielen <da...@thielen.com> on 2003/04/03 00:25:08 UTC
JSP won't work unless have package in taglib .java file
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?
thanks - dave
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
JSP won't work unless have package in taglib .java file
Posted by David Thielen <da...@thielen.com>.
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?
thanks - dave
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
Re: JSP won't work unless have package in taglib .java file
Posted by Radim Kubacki <ra...@sun.com>.
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
Re: JSP won't work unless have package in taglib .java file
Posted by David Thielen <da...@thielen.com>.
> 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?
>
> thanks - dave
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org