Problemas com JSTL (resolvido)

4 respostas
R

Estou usando Eclipse 3.3.1.1 e Tomcat 6.1 e fiz um jsp que deveria mostrar dados de uma tabela e parece que os comandos jstl não estão sendo interpretados.
O fonte do jsp:

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

<html>

<jsp:useBean id="db" class="dados.ArquivosDao" />

<!-- for para interagir com a lista retornada -->
 
<c:forEach var="aluno" items="${db.lista}">
 
 <li>
     <c:set var="nome" value="${aluno.nome}"/>
  nome: <c:out value="${nome}"/>,
  id ${aluno.id},
  Nascto ${aluno.dtNascto}
 </li>
 
</c:forEach>
     
<%
   db.disconnect();
%>

</html>

O resultado:

nome: ${nome}, id ${aluno.id}, Nascto ${aluno.dtNascto}

Criei outro projeto e levei esse jsp para lá e funcionou. Mas por que ? Por favor, quem puder me ajude, porque está ficando difícil acreditar que programar em Java seja produtivo.

Obrigado.

4 Respostas

Andre_Fonseca

rengav:
Estou usando Eclipse 3.3.1.1 e Tomcat 6.1 e fiz um jsp que deveria mostrar dados de uma tabela e parece que os comandos jstl não estão sendo interpretados.
O fonte do jsp:

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

<html>

<jsp:useBean id="db" class="dados.ArquivosDao" />

<!-- for para interagir com a lista retornada -->
 
<c:forEach var="aluno" items="${db.lista}">
 
 <li>
     <c:set var="nome" value="${aluno.nome}"/>
  nome: <c:out value="${nome}"/>,
  id ${aluno.id},
  Nascto ${aluno.dtNascto}
 </li>
 
</c:forEach>
     
<%
   db.disconnect();
%>

</html>

O resultado:

nome: ${nome}, id ${aluno.id}, Nascto ${aluno.dtNascto}

Criei outro projeto e levei esse jsp para lá e funcionou. Mas por que ? Por favor, quem puder me ajude, porque está ficando difícil acreditar que programar em Java seja produtivo.

Obrigado.

Oi,

Faz assim

<c:forEach var="aluno" items="${db.lista}" varStatus="id"> <li>${id.count} - ${aluno.nome} : ${aluno.dtNascto}</li> </c:forEach>

Tem outra coisa também, não faça db.disconnect() na sua jsp, crie uma fábrica de conexões para retornar a conexão para o seu dao, essa fábrica que deve encerrar a conexão, normalmente isso é feito em um finally

Abs

R

Infelizmente não funcionou. Provavelmente o erro deve estar em alguma configuração: web.xml; struts-config.xml ou outros.

Obrigado

R

Estou enviando os arquivos jsp convertidos.

Conversao correta:

package org.apache.jsp;

import javax.servlet.<em>;

import javax.servlet.http.</em>;

import javax.servlet.jsp.*;

public final class lista_002dscripletTeste_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {

private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();

private static java.util.List _jspx_dependants;

private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fforEach_005fvar_005fitems;

private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fset_005fvar_005fvalue_005fnobody;

private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fout_005fvalue_005fnobody;

private javax.el.ExpressionFactory _el_expressionfactory;
private org.apache.AnnotationProcessor _jsp_annotationprocessor;

public Object getDependants() {

return _jspx_dependants;

}
public void _jspInit() {

_005fjspx_005ftagPool_005fc_005fforEach_005fvar_005fitems = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());

_005fjspx_005ftagPool_005fc_005fset_005fvar_005fvalue_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());

_005fjspx_005ftagPool_005fc_005fout_005fvalue_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());

_el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();

_jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());

}
public void _jspDestroy() {

_005fjspx_005ftagPool_005fc_005fforEach_005fvar_005fitems.release();

_005fjspx_005ftagPool_005fc_005fset_005fvar_005fvalue_005fnobody.release();

_005fjspx_005ftagPool_005fc_005fout_005fvalue_005fnobody.release();

}

public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {

PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
PageContext _jspx_page_context = null;


try {
  response.setContentType("text/html");
  pageContext = _jspxFactory.getPageContext(this, request, response,
  			null, true, 8192, true);
  _jspx_page_context = pageContext;
  application = pageContext.getServletContext();
  config = pageContext.getServletConfig();
  session = pageContext.getSession();
  out = pageContext.getOut();
  _jspx_out = out;

  out.write("\r\n");
  out.write("\r\n");
  out.write("<html>\r\n");
  out.write("\r\n");
  dados.ArquivosDao db = null;
  synchronized (_jspx_page_context) {
    db = (dados.ArquivosDao) _jspx_page_context.getAttribute("db", PageContext.PAGE_SCOPE);
    if (db == null){
      db = new dados.ArquivosDao();
      _jspx_page_context.setAttribute("db", db, PageContext.PAGE_SCOPE);
    }
  }
  out.write("\r\n");
  out.write("\r\n");
  out.write("<!-- for para interagir com a lista retornada -->\r\n");
  out.write(" \r\n");
  if (_jspx_meth_c_005fforEach_005f0(_jspx_page_context))
    return;
  out.write("\r\n");
  out.write("\r\n");
  out.write("     \r\n");

db.disconnect();
<pre><code>  out.write("\r\n");
  out.write("\r\n");
  out.write("</html>\r\n");
  out.write("\r\n");
  out.write("   \r\n");
  out.write("\r\n");
} catch (Throwable t) {
  if (!(t instanceof SkipPageException)){
    out = _jspx_out;
    if (out != null && out.getBufferSize() != 0)
      try { out.clearBuffer(); } catch (java.io.IOException e) {}
    if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
  }
} finally {
  _jspxFactory.releasePageContext(_jspx_page_context);
}
} private boolean _jspx_meth_c_005fforEach_005f0(PageContext _jspx_page_context) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // c:forEach org.apache.taglibs.standard.tag.rt.core.ForEachTag _jspx_th_c_005fforEach_005f0 = (org.apache.taglibs.standard.tag.rt.core.ForEachTag) _005fjspx_005ftagPool_005fc_005fforEach_005fvar_005fitems.get(org.apache.taglibs.standard.tag.rt.core.ForEachTag.class); _jspx_th_c_005fforEach_005f0.setPageContext(_jspx_page_context); _jspx_th_c_005fforEach_005f0.setParent(null); // /lista-scripletTeste.jsp(9,0) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fforEach_005f0.setVar(“aluno”); // /lista-scripletTeste.jsp(9,0) name = items type = java.lang.Object reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fforEach_005f0.setItems((java.lang.Object) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${db.lista}", java.lang.Object.class, (PageContext)_jspx_page_context, null, false)); int[] _jspx_push_body_count_c_005fforEach_005f0 = new int[] { 0 }; try { int _jspx_eval_c_005fforEach_005f0 = _jspx_th_c_005fforEach_005f0.doStartTag(); if (_jspx_eval_c_005fforEach_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) { do { out.write("\r\n"); out.write(" \r\n"); out.write("
  • \r\n"); out.write(" “); if (_jspx_meth_c_005fset_005f0(_jspx_th_c_005fforEach_005f0, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0)) return true; out.write(”\r\n"); *********************** COMPARAR ESSE TRECHO
    out.write("  nome: ");
          if (_jspx_meth_c_005fout_005f0(_jspx_th_c_005fforEach_005f0, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0))
            return true;
          out.write(",\r\n");
          out.write("  id ");
          out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${aluno.id}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
          out.write(",\r\n");
          out.write("  Nascto ");
          out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${aluno.dtNascto}", java.lang.String.class, (PageContext)_jspx_page_context, null, false));
          out.write("\r\n");
    
    ****************************************** FIM
    out.write(" </li>\r\n");
          out.write(" \r\n");
          int evalDoAfterBody = _jspx_th_c_005fforEach_005f0.doAfterBody();
          if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
            break;
        } while (true);
      }
      if (_jspx_th_c_005fforEach_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
        return true;
      }
    } catch (Throwable _jspx_exception) {
      while (_jspx_push_body_count_c_005fforEach_005f0[0]-- > 0)
        out = _jspx_page_context.popBody();
      _jspx_th_c_005fforEach_005f0.doCatch(_jspx_exception);
    } finally {
      _jspx_th_c_005fforEach_005f0.doFinally();
      _005fjspx_005ftagPool_005fc_005fforEach_005fvar_005fitems.reuse(_jspx_th_c_005fforEach_005f0);
    }
    return false;
    
    } private boolean _jspx_meth_c_005fset_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f0, PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // c:set org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_005fset_005f0 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _005fjspx_005ftagPool_005fc_005fset_005fvar_005fvalue_005fnobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class); _jspx_th_c_005fset_005f0.setPageContext(_jspx_page_context); _jspx_th_c_005fset_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f0); // /lista-scripletTeste.jsp(12,5) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fset_005f0.setVar(“nome”); // /lista-scripletTeste.jsp(12,5) name = value type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fset_005f0.setValue((java.lang.Object) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${aluno.nome}", java.lang.Object.class, (PageContext)_jspx_page_context, null, false)); int _jspx_eval_c_005fset_005f0 = _jspx_th_c_005fset_005f0.doStartTag(); if (_jspx_th_c_005fset_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fset_005fvar_005fvalue_005fnobody.reuse(_jspx_th_c_005fset_005f0); return true; } _005fjspx_005ftagPool_005fc_005fset_005fvar_005fvalue_005fnobody.reuse(_jspx_th_c_005fset_005f0); return false; } private boolean _jspx_meth_c_005fout_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f0, PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0) throws Throwable { PageContext pageContext = _jspx_page_context; JspWriter out = _jspx_page_context.getOut(); // c:out org.apache.taglibs.standard.tag.rt.core.OutTag _jspx_th_c_005fout_005f0 = (org.apache.taglibs.standard.tag.rt.core.OutTag) _005fjspx_005ftagPool_005fc_005fout_005fvalue_005fnobody.get(org.apache.taglibs.standard.tag.rt.core.OutTag.class); _jspx_th_c_005fout_005f0.setPageContext(_jspx_page_context); _jspx_th_c_005fout_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f0); // /lista-scripletTeste.jsp(13,8) name = value type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null _jspx_th_c_005fout_005f0.setValue((java.lang.Object) org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("${nome}", java.lang.Object.class, (PageContext)_jspx_page_context, null, false)); int _jspx_eval_c_005fout_005f0 = _jspx_th_c_005fout_005f0.doStartTag(); if (_jspx_th_c_005fout_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) { _005fjspx_005ftagPool_005fc_005fout_005fvalue_005fnobody.reuse(_jspx_th_c_005fout_005f0); return true; } _005fjspx_005ftagPool_005fc_005fout_005fvalue_005fnobody.reuse(_jspx_th_c_005fout_005f0); return false; } }

    Conversão errada:

    package org.apache.jsp;
    
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.jsp.*;
    
    public final class lista_002dscripletTeste_jsp extends org.apache.jasper.runtime.HttpJspBase
        implements org.apache.jasper.runtime.JspSourceDependent {
    
      private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();
    
      private static java.util.List _jspx_dependants;
    
      private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fforEach_005fvar_005fitems;
      private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fset_005fvar_005fvalue_005fnobody;
      private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005fc_005fout_005fvalue_005fnobody;
    
      private javax.el.ExpressionFactory _el_expressionfactory;
      private org.apache.AnnotationProcessor _jsp_annotationprocessor;
    
      public Object getDependants() {
        return _jspx_dependants;
      }
    
      public void _jspInit() {
        _005fjspx_005ftagPool_005fc_005fforEach_005fvar_005fitems = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
        _005fjspx_005ftagPool_005fc_005fset_005fvar_005fvalue_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
        _005fjspx_005ftagPool_005fc_005fout_005fvalue_005fnobody = org.apache.jasper.runtime.TagHandlerPool.getTagHandlerPool(getServletConfig());
        _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
        _jsp_annotationprocessor = (org.apache.AnnotationProcessor) getServletConfig().getServletContext().getAttribute(org.apache.AnnotationProcessor.class.getName());
      }
    
      public void _jspDestroy() {
        _005fjspx_005ftagPool_005fc_005fforEach_005fvar_005fitems.release();
        _005fjspx_005ftagPool_005fc_005fset_005fvar_005fvalue_005fnobody.release();
        _005fjspx_005ftagPool_005fc_005fout_005fvalue_005fnobody.release();
      }
    
      public void _jspService(HttpServletRequest request, HttpServletResponse response)
            throws java.io.IOException, ServletException {
    
        PageContext pageContext = null;
        HttpSession session = null;
        ServletContext application = null;
        ServletConfig config = null;
        JspWriter out = null;
        Object page = this;
        JspWriter _jspx_out = null;
        PageContext _jspx_page_context = null;
    
    
        try {
          response.setContentType("text/html");
          pageContext = _jspxFactory.getPageContext(this, request, response,
          			null, true, 8192, true);
          _jspx_page_context = pageContext;
          application = pageContext.getServletContext();
          config = pageContext.getServletConfig();
          session = pageContext.getSession();
          out = pageContext.getOut();
          _jspx_out = out;
    
          out.write("\r\n");
          out.write("\r\n");
          out.write("<html>\r\n");
          out.write("\r\n");
          dados.ArquivosDao db = null;
          synchronized (_jspx_page_context) {
            db = (dados.ArquivosDao) _jspx_page_context.getAttribute("db", PageContext.PAGE_SCOPE);
            if (db == null){
              db = new dados.ArquivosDao();
              _jspx_page_context.setAttribute("db", db, PageContext.PAGE_SCOPE);
            }
          }
          out.write("\r\n");
          out.write("\r\n");
          out.write("<!-- for para interagir com a lista retornada -->\r\n");
          out.write(" \r\n");
          if (_jspx_meth_c_005fforEach_005f0(_jspx_page_context))
            return;
          out.write("\r\n");
          out.write("\r\n");
          out.write("     \r\n");
    
       db.disconnect();
    
          out.write("\r\n");
          out.write("\r\n");
          out.write("</html>\r\n");
          out.write("\r\n");
          out.write("   \r\n");
          out.write("\r\n");
        } catch (Throwable t) {
          if (!(t instanceof SkipPageException)){
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
              try { out.clearBuffer(); } catch (java.io.IOException e) {}
            if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
          }
        } finally {
          _jspxFactory.releasePageContext(_jspx_page_context);
        }
      }
    
      private boolean _jspx_meth_c_005fforEach_005f0(PageContext _jspx_page_context)
              throws Throwable {
        PageContext pageContext = _jspx_page_context;
        JspWriter out = _jspx_page_context.getOut();
        //  c:forEach
        org.apache.taglibs.standard.tag.rt.core.ForEachTag _jspx_th_c_005fforEach_005f0 = (org.apache.taglibs.standard.tag.rt.core.ForEachTag) _005fjspx_005ftagPool_005fc_005fforEach_005fvar_005fitems.get(org.apache.taglibs.standard.tag.rt.core.ForEachTag.class);
        _jspx_th_c_005fforEach_005f0.setPageContext(_jspx_page_context);
        _jspx_th_c_005fforEach_005f0.setParent(null);
        // /lista-scripletTeste.jsp(9,0) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_c_005fforEach_005f0.setVar("aluno");
        // /lista-scripletTeste.jsp(9,0) name = items type = java.lang.Object reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_c_005fforEach_005f0.setItems(new String("${db.lista}"));
        int[] _jspx_push_body_count_c_005fforEach_005f0 = new int[] { 0 };
        try {
          int _jspx_eval_c_005fforEach_005f0 = _jspx_th_c_005fforEach_005f0.doStartTag();
          if (_jspx_eval_c_005fforEach_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            do {
              out.write("\r\n");
              out.write(" \r\n");
              out.write(" <li>\r\n");
              out.write("     ");
              if (_jspx_meth_c_005fset_005f0(_jspx_th_c_005fforEach_005f0, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0))
                return true;
              out.write("\r\n");
    
    *********************** COMPARAR ESSE TRECHO
    ***********************
              out.write("  nome: ");
              if (_jspx_meth_c_005fout_005f0(_jspx_th_c_005fforEach_005f0, _jspx_page_context, _jspx_push_body_count_c_005fforEach_005f0))
                return true;
              out.write(",\r\n");
              out.write("  id ");
              out.write("${aluno.id}");
              out.write(",\r\n");
              out.write("  Nascto ");
              out.write("${aluno.dtNascto}");
              out.write("\r\n");
    ******************************************  FIM
    ******************************************
    
              out.write(" </li>\r\n");
              out.write(" \r\n");
              int evalDoAfterBody = _jspx_th_c_005fforEach_005f0.doAfterBody();
              if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                break;
            } while (true);
          }
          if (_jspx_th_c_005fforEach_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            return true;
          }
        } catch (Throwable _jspx_exception) {
          while (_jspx_push_body_count_c_005fforEach_005f0[0]-- > 0)
            out = _jspx_page_context.popBody();
          _jspx_th_c_005fforEach_005f0.doCatch(_jspx_exception);
        } finally {
          _jspx_th_c_005fforEach_005f0.doFinally();
          _005fjspx_005ftagPool_005fc_005fforEach_005fvar_005fitems.reuse(_jspx_th_c_005fforEach_005f0);
        }
        return false;
      }
    
      private boolean _jspx_meth_c_005fset_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f0, PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0)
              throws Throwable {
        PageContext pageContext = _jspx_page_context;
        JspWriter out = _jspx_page_context.getOut();
        //  c:set
        org.apache.taglibs.standard.tag.rt.core.SetTag _jspx_th_c_005fset_005f0 = (org.apache.taglibs.standard.tag.rt.core.SetTag) _005fjspx_005ftagPool_005fc_005fset_005fvar_005fvalue_005fnobody.get(org.apache.taglibs.standard.tag.rt.core.SetTag.class);
        _jspx_th_c_005fset_005f0.setPageContext(_jspx_page_context);
        _jspx_th_c_005fset_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f0);
        // /lista-scripletTeste.jsp(12,5) name = var type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_c_005fset_005f0.setVar("nome");
        // /lista-scripletTeste.jsp(12,5) name = value type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_c_005fset_005f0.setValue(new String("${aluno.nome}"));
        int _jspx_eval_c_005fset_005f0 = _jspx_th_c_005fset_005f0.doStartTag();
        if (_jspx_th_c_005fset_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
          _005fjspx_005ftagPool_005fc_005fset_005fvar_005fvalue_005fnobody.reuse(_jspx_th_c_005fset_005f0);
          return true;
        }
        _005fjspx_005ftagPool_005fc_005fset_005fvar_005fvalue_005fnobody.reuse(_jspx_th_c_005fset_005f0);
        return false;
      }
    
      private boolean _jspx_meth_c_005fout_005f0(javax.servlet.jsp.tagext.JspTag _jspx_th_c_005fforEach_005f0, PageContext _jspx_page_context, int[] _jspx_push_body_count_c_005fforEach_005f0)
              throws Throwable {
        PageContext pageContext = _jspx_page_context;
        JspWriter out = _jspx_page_context.getOut();
        //  c:out
        org.apache.taglibs.standard.tag.rt.core.OutTag _jspx_th_c_005fout_005f0 = (org.apache.taglibs.standard.tag.rt.core.OutTag) _005fjspx_005ftagPool_005fc_005fout_005fvalue_005fnobody.get(org.apache.taglibs.standard.tag.rt.core.OutTag.class);
        _jspx_th_c_005fout_005f0.setPageContext(_jspx_page_context);
        _jspx_th_c_005fout_005f0.setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_c_005fforEach_005f0);
        // /lista-scripletTeste.jsp(13,8) name = value type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_c_005fout_005f0.setValue(new String("${nome}"));
        int _jspx_eval_c_005fout_005f0 = _jspx_th_c_005fout_005f0.doStartTag();
        if (_jspx_th_c_005fout_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
          _005fjspx_005ftagPool_005fc_005fout_005fvalue_005fnobody.reuse(_jspx_th_c_005fout_005f0);
          return true;
        }
        _005fjspx_005ftagPool_005fc_005fout_005fvalue_005fnobody.reuse(_jspx_th_c_005fout_005f0);
        return false;
      }
    }
    

    Eu destaque a mais visível diferença com:

    *********************** COMPARAR ESSE TRECHO


    Quem puder ajudar, eu agradeço antecipadamente.

  • R

    Bem consegui fazer funcionar o jsp mais não descobri o erro. Tudo começou com testes com o Struts que tinha uma saída em jsp, que apresentou o erro do tópico. Tentei isolar o problema e nada de funcionar.
    O que eu fiz:
    ** criei um novo projeto no Eclipse com o plugin do Tomcat;
    ** acrescentei o jsp mencionado acima e executei-o com sucesso
    ** acrescentei a estrutura do Struts com o plugin SrutsIde
    ** executei novamente o jsp e funcionou
    ** acrescentei os fontes ligados ao Struts, alterei web.xml e struts-config.xml de acordo com o projeto com problemas e …funcionou.

    Que maravilha !!! Funciona, mas fica no campo do “esoterismo” a razão da execução bem sucedida desse novo projeto.

    Criado 25 de julho de 2008
    Ultima resposta 30 de jul. de 2008
    Respostas 4
    Participantes 2