Problemas com taglibs

0 respostas
R

Galera... eu simplesmente estou querendo fazer um substring d um ArrayList q vem d um servlet pra tirar os colchetes. Só q antes eu estava testando a função de substring e fica dando um erro q eu não consigo consertar, ja procurei na net mas nada deu jeito. O trecho d código eh o seguinte:

<c:out value="${fn:substring('[teste]', fn:indexOf('[teste]','[')+1, fn:indexOf('[teste]', ']'))}"/>

Eu declaro as taglibs assim:

<%@ taglib uri='core' prefix='c'%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

O erro que dá eh o seguinte:

org.apache.jasper.JasperException:

Validation error messages from TagLibraryValidator for c in /jsp/printSearchResults.jsp


202: tag = 'out' / attribute = 'value': An error occurred while parsing custom action attribute "value" with value "${fn:substring('[teste]', fn:indexOf('[teste]','[')+1, fn:indexOf('[teste]', ']'))}": org.apache.taglibs.standard.lang.jstl.parser.ParseException: EL functions are not supported.

Eu já vi q parece q isso eh erro d mapeamento de taglibs mas eu nao sei oq está errado... a core eu tenho ctz q está mapeada certa... e eu já tentei também usar a functions com a uri num arquivo local fn.tld também e não funcionou.... o mapeamento no xml está assim:

<taglib>
	<taglib-uri>core-rt</taglib-uri>
	<taglib-location>/WEB-INF/tld/c-rt.tld</taglib-location>
</taglib>

<taglib>
	<taglib-uri>core</taglib-uri>
	<taglib-location>/WEB-INF/tld/c.tld</taglib-location>
</taglib>

<taglib>
	<taglib-uri>functions</taglib-uri>
	<taglib-location>/WEB-INF/tld/fn.tld</taglib-location>
</taglib>

Já tentei muder o uri do functions pra functions ao invés de http://java.sun.com/jsp/jstl/functions, mas também não teve jeito. Conto com a ajuda d vcs! Caso eu consiga aqui por conta própria eu falo como eu fiz... E desculpem se eu escreví d+

Criado 27 de julho de 2009
Respostas 0
Participantes 1