You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Lena Lindström <ll...@ies.se> on 2000/04/03 14:22:32 UTC
Unable to open taglibrary
Hi,
I'm a new user of JSP and I am trying to use the taglib element, but it won't work. :(
I'm running the tomcat server in location D:\tomcat\bin.
I haven't made any changes to server.xml, but I have added the taglib to D:\tomcat\conf\web.xml, like this (after <web-app>). I have restarted tomcat after these changes.
<taglib>
<taglib-uri>/dlexpress/taglib</taglib-uri>
<taglib-location>http://localhost:8080/examples/WEB-INF/tlds/taglib.tld</taglib-location>
</taglib>
My library is located in D:\tomcat\webapps\examples\WEB-INF\tlds and its name is taglib.tld.
I am referring to the library from my JSP page (template.jsp) like this:
<%@ taglib uri="/dlexpress/taglib" prefix="j2ee" %>
The location of the template.jsp is D:\tomcat\webapps\examples\jsp\iter1
I reach my JSP page with URL: http://localhost:8080/examples/jsp/iter1/template.jsp
and I get the error message:
org.apache.jasper.JasperException: Unable to open taglibrary /dlexpress/taglib : Parse Error in the tag library descriptor: com.sun.xml.parser/V-038 form-login-config
at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java, Compiled Code)
at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:116)
at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java, Compiled Code)
at org.apache.jasper.compiler.Parser.parse(Parser.java, Compiled Code)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1039)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1035)
(stack dump follows)
Please help me if anyone knows what I'm doing wrong. Thanks!
Re: Unable to open taglibrary
Posted by Hans Bergsten <ha...@gefionsoftware.com>.
Lena Lindström wrote:
>
> Hi,
> I'm a new user of JSP and I am trying to use the taglib element, but it won't work. :(
>
> I'm running the tomcat server in location D:\tomcat\bin.
> I haven't made any changes to server.xml, but I have added the taglib to D:\tomcat\conf\web.xml, like this (after <web-app>). I have restarted tomcat after these changes.
>
> <taglib>
> <taglib-uri>/dlexpress/taglib</taglib-uri>
> <taglib-location>http://localhost:8080/examples/WEB-INF/tlds/taglib.tld</taglib-location>
> </taglib>
>
> My library is located in D:\tomcat\webapps\examples\WEB-INF\tlds and its name is taglib.tld.
>
> I am referring to the library from my JSP page (template.jsp) like this:
> <%@ taglib uri="/dlexpress/taglib" prefix="j2ee" %>
When you use the <taglib> element in web.xml to specify the location of
the TLD, the uri must be the same as you use in the taglib directive
(the recommendation is that it's a URL but it can be any symbolic name
you like) and the location must be the physical location of the TLD,
as a path relative to the context document base. With the info you have
provided, it should look like this:
<taglib>
<taglib-uri>/dlexpress/taglib</taglib-uri>
<taglib-location>/WEB-INF/tlds/taglib.tld</taglib-location>
</taglib>
Hans
PS. This type of question is better sent to the Tomcat user list, see
the web site for how to sign up.
--
Hans Bergsten hans@gefionsoftware.com
Gefion Software http://www.gefionsoftware.com