I have a project "lib" with classes that are common to other projects. In the project "guestbook" I want to use the tags defined in lib.jar I think for that I need to create a URI for my custom tag, as the spring is:
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
And so I did, with a link any of my site (note: 404 returns, as well as in spring)
<%@ taglib uri="http://mysite.com/tags" prefix="myTag"%>
The guestbook says it can not find that tag. But as he does with the spring? I need to do some mapping?
Edit:
lib.jar/META-INF/filtro.tld:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<taglib xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
version="2.1">
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>filtro</shortname>
<uri>http://desenvolvimento.rokko.com.br/tags</uri>
<description>Tags para Filtro Avançado</description>
<info>Tags para Filtro Avançado</info>
<tag>
<name>filtro</name>
<tagclass>br.com.rokko.lib.helper.FiltroTag</tagclass>
<bodycontent>JSP</bodycontent>
<info>Filtro</info>
</tag>
</taglib>
Some jsp from guestbook:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://desenvolvimento.rokko.com.br/tags" prefix="filtro"%> <!--error-->
<%@page contentType="text/html" pageEncoding="UTF-8"%>
That's right!
It seems to be a bug in the IDE (SpringSource Tool Suite). It shows a red line, as an error. But it compiles and runs right.