aspose file tools*
The moose likes Tomcat and the fly likes Compiling JSP+ Tag in Tomcat 4.0.3/Forte IDE 2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Compiling JSP+ Tag in Tomcat 4.0.3/Forte IDE 2.0" Watch "Compiling JSP+ Tag in Tomcat 4.0.3/Forte IDE 2.0" New topic
Author

Compiling JSP+ Tag in Tomcat 4.0.3/Forte IDE 2.0

Gabriel Fox
Ranch Hand

Joined: Oct 17, 2001
Posts: 170
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.
Ravi Veera
Ranch Hand

Joined: Jun 23, 2001
Posts: 127
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

Joined: Oct 17, 2001
Posts: 170
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
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Can you use remote tag libs like that, just by putting a URL for the URI?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Compiling JSP+ Tag in Tomcat 4.0.3/Forte IDE 2.0
 
Similar Threads
Download taglib
problem with jstl
Problems with JavaMail 1.2 using Tomcat
jsp with struts taglibs cant compile in Tomcat
Error:java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo