Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Can not find the tag library descriptor Error
Can not find the tag library descriptor Error [message #985878] Fri, 16 November 2012 14:34 Go to next message
Alain L is currently offline Alain L
Messages: 4
Registered: November 2012
Junior Member
Hi there,

This might seem basic, but I am just starting with this, so please bear with me. I am learning JSP, and I am learning about tag libraries, and it doesn't seem to work, and I can't figure out why. I've tried to find and answer, but every solution doesn't seem to work for me...

I am using Eclipse Jave EE IDE version Indigo Service release 2 and my web server is Oracle Web Logic Server 11gR1 (10.3.3)

I've made my tag class that is in a package called "com.tutorialspoint"
package com.tutorialspoint;

import javax.servlet.jsp.tagext.*;
import javax.servlet.jsp.*;
import java.io.*;

public class HelloTag extends SimpleTagSupport {

public void doTag() throws JspException, IOException{
JspWriter out = getJspContext().getOut();
out.println("Hello Custom Tag!!!");
}
}


I've made my tag file called custom.tld directly in the WEB-INF folder
<?xml version="1.0" encoding="UTF-8"?>
<taglib>
<tlib-version>1.0</tlib-version>
<jsp-version>2.0</jsp-version>
<short-name>Example TLD</short-name>
<tag>
<name>Hello</name>
<tag-class>com.tutorialspoint.HelloTag</tag-class>
<body-content>empty</body-content>
</tag>
</taglib>


and finally I've made my JSP page
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>

<!-- Declare the custom tag library -->
<%@ taglib prefix="ex" uri="WEB-INF/custom.tld" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http : // www . w3 . org / TR / html4 / loose . dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Sample Custom Tag</title>
</head>
<body>
<ex:Hello />
</body>
</html>


The line in bold (<%@ taglib prefix="ex" uri="WEB-INF/custom.tld" %>) is the line in error
"Can not find the tag library descriptor for "WEB-INF/custom.tld""

Can anyone explain to me why this is not working?

index.php/fa/12367/0/

[Updated on: Fri, 16 November 2012 14:45]

Report message to a moderator

Re: Can not find the tag library descriptor Error [message #985919 is a reply to message #985878] Fri, 16 November 2012 16:47 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2266
Registered: July 2009
Senior Member
On 11/16/2012 9:36 AM, Alain L wrote:
> The line in bold (<%@ taglib prefix="ex" uri="WEB-INF/custom.tld" %>) is
> the line in error "Can not find the tag library descriptor for
> "WEB-INF/custom.tld""
>
> Can anyone explain to me why this is not working?

Where did you create the JSP page? Do you have automatic builds
enabled? Does the error go away when you clean and rebuild the project?

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational


---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: Can not find the tag library descriptor Error [message #985926 is a reply to message #985919] Fri, 16 November 2012 17:20 Go to previous messageGo to next message
Alain L is currently offline Alain L
Messages: 4
Registered: November 2012
Junior Member
Nitin Dahyabhai wrote on Fri, 16 November 2012 11:47
On 11/16/2012 9:36 AM, Alain L wrote:
> The line in bold (<%@ taglib prefix="ex" uri="WEB-INF/custom.tld" %>) is
> the line in error "Can not find the tag library descriptor for
> "WEB-INF/custom.tld""
>
> Can anyone explain to me why this is not working?

Where did you create the JSP page? Do you have automatic builds
enabled? Does the error go away when you clean and rebuild the project?

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational


I've created my JSP in Eclipse by right-clicking - New - JSP file and it resides in my project\Java Resources\src\com.tutorialspoint

I do have automatic builds enabled, but I did try to uncheck it and rebuild the project, but the error is still there.
Re: Can not find the tag library descriptor Error [message #985946 is a reply to message #985926] Fri, 16 November 2012 19:41 Go to previous message
Alain L is currently offline Alain L
Messages: 4
Registered: November 2012
Junior Member
I could not figure out the error, so I deleted all the whole project and restarted anew, and seems that it works now...

Thanks

Alain
Previous Topic:Posting Error
Next Topic:How to provide security in remote Rhino debugger?
Goto Forum:
  


Current Time: Wed Sep 17 01:49:57 GMT 2014

Powered by FUDForum. Page generated in 0.01625 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software