Olá:
Criei uma Tag library chamada DateTag. Seu arquivo TLD é o seguinte:
<?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/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlib-version>0.90</tlib-version>
<jsp-version>1.2</jsp-version>
<short-name>ibsoftware</short-name>
<uri>http://www.ibsoftware.com.br/taglib</uri>
<tag>
<name>DateTag</name>
<tag-class>DateTag</tag-class>
<body-content>empty</body-content>
<description>
This is a description of the tag.
</description>
<attribute>
<name>name</name>
<required>true</required>
</attribute>
<attribute>
<name>date</name>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>optionsAttribute</name>
</attribute>
<attribute>
<name>selectsAttribute</name>
</attribute>
</tag>
</taglib>
O Web.xml está assim:
<?xml version="1.0" ?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<taglib>
<taglib-uri>http://www.ibsoftware.com.br/taglib</taglib-uri>
<taglib-location>/WEB-INF/DateTag.tld</taglib-location>
</taglib>
</web-app>
E a página que chama a Tag é esta:
<%@ page language="java" %>
<%@ taglib uri='http://www.ibsoftware.com.br/taglib' prefix='ibsoftware'%>
<!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<title>Teste de dateTag</title>
</head>
<body bgcolor="#FFFFFF">
<form action='resultado.jsp'>
<ibsoftware:DateTag name="data" />
<br/>
<input type="submit"/>
</form>
</body>
</html>
O aplicativo web está organizado da seguinte forma:
date
|
--index.jsp
|
--WEB-INF
|
--web.xml
|
--DateTag.tld
|
--classes
|
-- DateTag.class
Mau problema ocorre quando tento acessar o index.jsp (pela URL http://localhost:8080/date/index.jsp). Obtenho esta mensagem de erro:
Isso não me faz muito sentido, pois estou referenciando à uri no web.xml.
Alguém pode me dar uma idéia do que estou fazendo de errado.
Grato,