JSTL[Resolvido]

4 respostas
F

Boa tarde pessoal,

Procurei no fórum vi algumas soluções mas não coube ao meu caso.
Fiz uma aplicação web com jstl já adicionei os jar
jstl-api-1.2.jar
jstl-impl-1.2.jar
standard.jar

Mas não funciona da o seguinte erro:
Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: The absolute uri: <a href="http://java.sun.com/jsp/jstl/core">http://java.sun.com/jsp/jstl/core</a> cannot be resolved in either web.xml or the jar files deployed with this application

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:56)

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:410)

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:117)

org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:311)

org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:152)

org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:410)

org.apache.jasper.compiler.Parser.parseDirective(Parser.java:475)

org.apache.jasper.compiler.Parser.parseElements(Parser.java:1425)

org.apache.jasper.compiler.Parser.parse(Parser.java:138)

org.apache.jasper.compiler.ParserController.doParse(ParserController.java:242)

org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)

org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)

javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:745)

org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:716)

org.apache.jsp.index_jsp._jspService(index_jsp.java:64)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)

javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.23 logs.

obs: em todas minhas jsp coloquei também
<%@ taglib uri=“http://java.sun.com/jsp/jstl/core” prefix=“c” %>
<%@ taglib uri=“http://java.sun.com/jsp/jstl/fmt” prefix=“fmt”%>

Obrigado, fico no aguardo.

Felipe

4 Respostas

pedruhenrik

declarou os .jars no classpath?
os jars estão dentro do projeto?
como esta o seu web.xml?

já leu isso aqui: http://www.guj.com.br/java/38075-declarando-taglib-no-webxml- ?

att,

R

Acredito que o Problema seja o que o pedruhenrik falou… os seus jars podem não estar no seu projeto… ou pegou jars errado… algo do tipo…

F

bem pessoal ainda estou tomando uma surra aqui. O os jar estão no projeto sim me parece que o problema é no xml mesmo, segui as dicas utilizadas no link que pedruhenrik passou ajudou bastante mas agora o erro está diferente.
Devo estar fazendo algo errado no xml.
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: /ListaPizza.jsp (line: 3, column: 62) File “/WEB-INF/jstl.tld” not found

org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)

org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)

org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:133)

org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:166)

org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:410)

org.apache.jasper.compiler.Parser.parseDirective(Parser.java:475)

org.apache.jasper.compiler.Parser.parseElements(Parser.java:1425)

org.apache.jasper.compiler.Parser.parse(Parser.java:138)

org.apache.jasper.compiler.ParserController.doParse(ParserController.java:242)

org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)

org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:198)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)

org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)

javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:745)

org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:716)

org.apache.jsp.index_jsp._jspService(index_jsp.java:66)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)

javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.23 logs.

Segue o web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
  <display-name>AppWebPizza</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
  <jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/jstl.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/core_rt</taglib-uri>
<taglib-location>/WEB-INF/standard.tld</taglib-location>
</taglib> 
</jsp-config>
</web-app>

Vlw pessoal

ViniGodoy

Movido para o fórum de desenvolvimento web.

Criado 27 de janeiro de 2012
Ultima resposta 29 de jan. de 2012
Respostas 4
Participantes 4