You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2004/06/17 14:26:38 UTC

DO NOT REPLY [Bug 29638] New: - Tomcat generates invalid debug info for custom tags

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29638>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29638

Tomcat generates invalid debug info for custom tags

           Summary: Tomcat generates invalid debug info for custom tags
           Product: Tomcat 5
           Version: 5.0.25
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Unknown
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: lex@intellij.net


all the contents of custom tag is bound to the first line of the tag.

for example.
<%@ page import="java.util.ArrayList"%>
<%@page contentType="text/html;charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<%--<%@taglib prefix="x" uri="http://java.sun.com/jstl/xml"%>--%>
<%--<%@taglib prefix="csp" uri="http://www.cosespseguros.com.br/taglibs/2" %>--
%>

<%
  ArrayList items = new ArrayList();
  items.add("foo");
  items.add("foobar");
  items.add("foobar");
  items.add("foobar");
  pageContext.setAttribute("items", items);
%>



<html>
<head><title>Localized Dates</title></head>
<body bgcolor="white">

<form name="localeForm" action="index.jsp" method="post">
<c:set var="selectedLocaleString" value="${param.locale}" />
<c:set var="selectedFlag"
  value="${!empty selectedLocaleString}" />
<b>Locale:</b>
<select name=locale>
<c:forEach var="localeString" items="${items}" >
  <c:choose>
    <c:when test="${selectedFlag}">
      <c:choose>
        <c:when test="${selectedLocaleString == localeString}" >
          <option selected>${localeString}</option>
        </c:when>
        <c:otherwise>
          <option>${localeString}</option>
        </c:otherwise>
      </c:choose>
    </c:when>
    <c:otherwise>
      <option>${localeString}</option>
    </c:otherwise>
  </c:choose>
</c:forEach>
</select>
<input type="submit" name="Submit" value="Get Date">
</form>

I step with debugger through code generated from JSP to the line 357
which contains out.write("    <option>${localeString}</option>"). This line 
corresponds line 41 in this testcase. But debug JDI returns line 40 for "JSP" 
strata.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org