Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Newbie - problem with JSP tag libraries

0 views
Skip to first unread message

zalek

unread,
Jul 15, 2008, 7:39:13 PM7/15/08
to
Hello,

I am trying to execute on a JSP program on a server with jakarta-
tomcat-4.1.29.
Here is a program:

<%@ taglib uri="testTagURL" prefix="testTagPrefix" %>
<testTagPrefix:myFirstTag/>

in web.xml I have definition:

<taglib>
<taglib-uri>testTagURL</taglib-uri>
<taglib-location>/WEB-INF/tld/testTag.tld</taglib-location>
</taglib>

I have testTag.tld file located at: /WEB-INF/tld

When I execute my program I am getting:

org.apache.jasper.JasperException: File "/test-jsp/testTagURL" not
found
at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:
105)
at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:
430)
at
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:
154)
at org.apache.jasper.compiler.TagLibraryInfoImpl.
(TagLibraryInfoImpl.java:180)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:
354)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:381)

My question: how my program is looking for "/test-jsp/testTagURL" and
not for "/WEB-INF/tld/testTag.tld"?

Thanks,

Zalek

zalek

unread,
Jul 17, 2008, 7:07:43 AM7/17/08
to

I found the problem. I changed the order of web.xml parms:
This did not work:

<web-app>

<taglib>
<taglib-uri>testTagURL</taglib-uri>
<taglib-location>/WEB-INF/tld/testTag.tld</taglib-location>
</taglib>

<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>

</web-app>

This worked:

<web-app>

<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*</url-pattern>
</servlet-mapping>

<taglib>
<taglib-uri>testTagURL</taglib-uri>
<taglib-location>/WEB-INF/tld/testTag.tld</taglib-location>
</taglib>


</web-app>

Zalek

0 new messages