aspose file tools
The moose likes JSP and the fly likes Custom Tags Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Custom Tags" Watch "Custom Tags" New topic

Custom Tags

paromitabanerjee mukerjibanerjee

Joined: Dec 20, 2004
Posts: 23
Am stuck with Tag Libraries. the engine shows me 'not found' error. I havs follwed the following steps :

1) I hav created a SimpleTag.class and stored it in /webapps/root/egPM/WEB-INF/classes/.
2) Have created a TLD and stored it in /webapps/root/egPM/WEB-INF/.
The code in the TLD is :

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "">

<info>My tag library descriptor file</info>


3) in the /webapps/root/egPM/WEB-INF/web.xml file I hav added the following code :

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"

<display-name>Welcome to Tomcat</display-name>
Welcome to Tomcat

4) I hav created a simple jsp file to access the tags and hav placed it at :

The code is as follows :
<head><title>Displaying a CustomTag</title></head>
<%@ taglib uri="/myTLD" prefix="myTags" %>


But when i run this file, an error is displayed saying /myTLD doesnt exist. I hav checked with a couple of books and followed exactly as they hav mentioned but to no avail. the error persists.....

Thnkz in advance for the help.

It is sorta covered in the JavaRanch Style Guide.
subject: Custom Tags