Erro no eclipse, com Struts e JSTL

3 respostas
cu_ringa

to fazendo uma aplicação no eclipse, mas ta dando os seguintes erros

JSP Parsing Error:File "/tags/struts-logic" not found

JSP Parsing Error:The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

o q devo fazer p consertar, ja importei os jar e as tld

3 Respostas

cu_ringa

eu n sei pq apareceu esse <a href=“http…”

a parte do >

rodrigoallemand

Sobre o erro do struts-logic, ou o uri indicado no web.xml não bate com a colocada no .jsp ou o caminho real do arquivo não bate com o descrito no web.xml.
Agora, sobre o JSTL, porque vc não usa somente JSTL na VIEW do seu sistema e ignora as tags do eclipse? Há muitos autores que já testaram e dizem que usar as taglibs do JSTL é melhor dio que usar as taglibs do Strtuts.

cu_ringa

arvore do projeto, em lib tem os outros jar do struts e em WEB-INF estão os outros arquivos tld e xml

invent_estoque
      |
      |___jstl.jar
      |___standard.jar
      |___struts.jar
      |
      |___WEB-INF
                   |___lib
                   |___struts-logic.tld
                   |___web.xml

arquivo web.xml

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

<!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>
  <display-name>Struts Blank Application</display-name>
  
  <!-- Standard Action Servlet Configuration (with debugging) -->
  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>2</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>2</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
  </servlet>


  <!-- Standard Action Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>


  <!-- The Usual Welcome File List -->
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>


  <!-- Struts Tag Library Descriptors -->
  <taglib>
    <taglib-uri>/tags/struts-bean</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>/tags/struts-html</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>/tags/struts-logic</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>/tags/struts-nested</taglib-uri>
    <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
  </taglib>

  <taglib>
    <taglib-uri>/tags/struts-tiles</taglib-uri>
    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
  </taglib>

</web-app>

pag jsp onde tem a tag logic

<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<logic:redirect forward="select"/>
Criado 22 de março de 2005
Ultima resposta 22 de mar. de 2005
Respostas 3
Participantes 2