You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jo...@fwd.at on 2003/03/30 12:32:17 UTC

JSP Taglib resolution trouble

Hi there,

If I try to compile a JSP with an absolute URI to a taglib like 
<%@ taglib prefix="c" uri = "http://java.sun.com/jstl/core" %>

then the compiler complains:
jspc:
2003-03-30 12:30:05 - ERROR-the file '\views\mylist\list.jsp' ge
nerated the following general exception: 
org.apache.jasper.JasperException: This
 absolute uri (http://java.sun.com/jstl/core) cannot be resolved in either 
web.x
ml or the jar files deployed with this application
  [jasper2] Error in class org.apache.jasper.JspC

However, if I have this absolut URI in the static web/myfile.jsp 
directory, everything runs smoothly (i.e. if Tomcat compiles during 
runtime, it does not complain).

However, if I change the absolute URI to a local URI and supply the 
TLD-file, everything runs fine again (i.e. JSPC is working fine):
<%@ taglib prefix="c" uri = "/WEB-INF/c.tld" %>

Has anybody an idea why JSPC works differently to the JSP compilation 
during runtime?

thx alot
Johannes

Re: JSP Taglib resolution trouble

Posted by Dov Rosenberg <do...@conviveon.com>.
That is what we do as well. Here is what I have added in our web.xml

<taglib>
		<taglib-uri>/CAStaglib</taglib-uri>
		<taglib-location>/WEB-INF/tlds/conviveon.tld</taglib-location>
	</taglib>

I would expect the taglib-location could just as easily be a URL. In 
our JSP pages we declare the taglibrary like

<%@ taglib uri="/CAStaglib" prefix="CAS" %>

HTH

Dov Rosenberg


On Sunday, March 30, 2003, at 03:22  PM, johannes.fiala@fwd.at wrote:

> Hi Dov,
>
> Do you know how to describe a taglib with an absolute uri (e.g.
> http://java.sun.com/jstl/core) in web.xml? Can you post a sample here?
>
> I haven't had to describe my taglib in web.xml yet, because I used the
> /WEB-INF/xxx.tld syntax in my JSPs, thus they always have worked so 
> far!
>
> thx alot
> Johannes
>
>
>
>
>
> Dov Rosenberg <do...@conviveon.com>
> 30.03.2003 17:17
> Please respond to
> "Tomcat Users List" <to...@jakarta.apache.org>
>
>
> To
> "Tomcat Users List" <to...@jakarta.apache.org>
> cc
>
> Subject
> Re: JSP Taglib resolution trouble
>
>
>
>
>
>
> Make sure you add the TagLib definition in the web.xml.
>
> Dov Rosenberg
>
>
> On Sunday, March 30, 2003, at 05:32  AM, johannes.fiala@fwd.at wrote:
>
>> Hi there,
>>
>> If I try to compile a JSP with an absolute URI to a taglib like
>> <%@ taglib prefix="c" uri = "http://java.sun.com/jstl/core" %>
>>
>> then the compiler complains:
>> jspc:
>> 2003-03-30 12:30:05 - ERROR-the file '\views\mylist\list.jsp' ge
>> nerated the following general exception:
>> org.apache.jasper.JasperException: This
>>  absolute uri (http://java.sun.com/jstl/core) cannot be resolved in
>> either
>> web.x
>> ml or the jar files deployed with this application
>>   [jasper2] Error in class org.apache.jasper.JspC
>>
>> However, if I have this absolut URI in the static web/myfile.jsp
>> directory, everything runs smoothly (i.e. if Tomcat compiles during
>> runtime, it does not complain).
>>
>> However, if I change the absolute URI to a local URI and supply the
>> TLD-file, everything runs fine again (i.e. JSPC is working fine):
>> <%@ taglib prefix="c" uri = "/WEB-INF/c.tld" %>
>>
>> Has anybody an idea why JSPC works differently to the JSP compilation
>> during runtime?
>>
>> thx alot
>> Johannes
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


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


Re: JSP Taglib resolution trouble

Posted by jo...@fwd.at.
Hi Dov,

Do you know how to describe a taglib with an absolute uri (e.g. 
http://java.sun.com/jstl/core) in web.xml? Can you post a sample here?

I haven't had to describe my taglib in web.xml yet, because I used the 
/WEB-INF/xxx.tld syntax in my JSPs, thus they always have worked so far!

thx alot
Johannes





Dov Rosenberg <do...@conviveon.com> 
30.03.2003 17:17
Please respond to
"Tomcat Users List" <to...@jakarta.apache.org>


To
"Tomcat Users List" <to...@jakarta.apache.org>
cc

Subject
Re: JSP Taglib resolution trouble






Make sure you add the TagLib definition in the web.xml.

Dov Rosenberg


On Sunday, March 30, 2003, at 05:32  AM, johannes.fiala@fwd.at wrote:

> Hi there,
>
> If I try to compile a JSP with an absolute URI to a taglib like
> <%@ taglib prefix="c" uri = "http://java.sun.com/jstl/core" %>
>
> then the compiler complains:
> jspc:
> 2003-03-30 12:30:05 - ERROR-the file '\views\mylist\list.jsp' ge
> nerated the following general exception:
> org.apache.jasper.JasperException: This
>  absolute uri (http://java.sun.com/jstl/core) cannot be resolved in 
> either
> web.x
> ml or the jar files deployed with this application
>   [jasper2] Error in class org.apache.jasper.JspC
>
> However, if I have this absolut URI in the static web/myfile.jsp
> directory, everything runs smoothly (i.e. if Tomcat compiles during
> runtime, it does not complain).
>
> However, if I change the absolute URI to a local URI and supply the
> TLD-file, everything runs fine again (i.e. JSPC is working fine):
> <%@ taglib prefix="c" uri = "/WEB-INF/c.tld" %>
>
> Has anybody an idea why JSPC works differently to the JSP compilation
> during runtime?
>
> thx alot
> Johannes


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



Re: JSP Taglib resolution trouble

Posted by Dov Rosenberg <do...@conviveon.com>.
Make sure you add the TagLib definition in the web.xml.

Dov Rosenberg


On Sunday, March 30, 2003, at 05:32  AM, johannes.fiala@fwd.at wrote:

> Hi there,
>
> If I try to compile a JSP with an absolute URI to a taglib like
> <%@ taglib prefix="c" uri = "http://java.sun.com/jstl/core" %>
>
> then the compiler complains:
> jspc:
> 2003-03-30 12:30:05 - ERROR-the file '\views\mylist\list.jsp' ge
> nerated the following general exception:
> org.apache.jasper.JasperException: This
>  absolute uri (http://java.sun.com/jstl/core) cannot be resolved in 
> either
> web.x
> ml or the jar files deployed with this application
>   [jasper2] Error in class org.apache.jasper.JspC
>
> However, if I have this absolut URI in the static web/myfile.jsp
> directory, everything runs smoothly (i.e. if Tomcat compiles during
> runtime, it does not complain).
>
> However, if I change the absolute URI to a local URI and supply the
> TLD-file, everything runs fine again (i.e. JSPC is working fine):
> <%@ taglib prefix="c" uri = "/WEB-INF/c.tld" %>
>
> Has anybody an idea why JSPC works differently to the JSP compilation
> during runtime?
>
> thx alot
> Johannes


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