Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Compiling JSP+ Tag in Tomcat 4.0.3/Forte IDE 2.0

 
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys, i have been battling with this for days
now, trying to compile my HelloWorld JSP which
contains a custom tag , but i keep getting this error :
HelloJSP.jsp [4:9] Unable to open taglibrary http://jakarta.apache.org/taglibs/utilitytags : Could not locate TLD META-INF/taglib.tld
On trying to view from browser , even without compiling i got this :
org.apache.jasper.JasperException: This absolute uri (http://jakarta.apache.org/taglibs/utilitytags) cannot be resolved in either web.xml or the jar files deployed with this application
at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:194)
at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:174)
NOTE : I am using TOMCAT 4.0.3
Am i leaving something undone.All ideas will be
appreciated.
 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Two things that you need to verify.
1. Check your web.xml file to verify that you have specified the location of your tld file
Here's an example.
<taglib>
<taglib-uri>/dataSample</taglib-uri>
<taglib-location>
/WEB-INF/tlds/LTDbBean-taglib.tld
</taglib-location>
</taglib>
2.Make sure you have the tld file within in the WEB-INF directory(where you have specified it).
 
Gabriel Fox
Ranch Hand
Posts: 170
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am still in a fix . I used a different Custom Tag from adifferent book but still same error :
1.de/gehe/uk/rms/RMSAccess/JavaScriptTag_Example.jsp [8:4] Unable to open taglibrary http://www.jspinsider.com/jspkit/javascript : Could not locate TLD META-INF/taglib.tld , on conpiling
2.On viewing from browser i got This : org.apache.jasper.JasperException: XML parsing error on file /Web-inf/tlds/JavaScriptExampleTag.tld: Invalid PUBLIC ID: -//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2 //EN
at org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:226)
at org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:283)
at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:219)
at org.apache.jasper.compiler.JspParseEventListener.processTaglibDirective(JspParseEventListener.java:1164)
at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:758)
at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:121)

Please, i am pasting my web.xml and xxx.tld below .Please help :
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>

<taglib>
<taglib-uri>
http://www.jspinsider.com/jspkit/javascript
</taglib-uri>
<taglib-location>
/Web-inf/tlds/JavaScriptExampleTag.tld
</taglib-location>
</taglib>
</web-app>
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE taglib
PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2 //EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd" >
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>JavaScriptExampleTag</short-name>
<uri> http://www.jspinsider.com/jspkit/javascript</uri>
<description> A Simple Javascript Tag</description>
<tag>
<name>message</name>
<tag-class>de.gehe.uk.rms.RMSAccess.JavaScriptExampleTag</tag-class>
<info> A Simple Javascript Tag </info>
</tag>
</taglib>

NOTE : I am using TOMCAT 4.0.3
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you use remote tag libs like that, just by putting a URL for the URI?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic