This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 204100 - jstl formatting problem in jsp file.
Summary: jstl formatting problem in jsp file.
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: JSP (show other bugs)
Version: 7.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-22 13:22 UTC by fortruth
Modified: 2016-07-07 08:56 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
libs not sorted in java se project (12.11 KB, image/png)
2012-09-29 03:10 UTC, fortruth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description fortruth 2011-10-22 13:22:52 UTC
Product Version = NetBeans IDE Dev (Build nbms-and-javadoc-7961-on-20110924)
Operating System = Linux version 3.0.0-13-generic running on amd64
Java; VM; Vendor = 1.6.0_23
Runtime = OpenJDK 64-Bit Server VM 20.0-b11

Errors example as.

<c:forEach var="field" items="${fields}">
                        <c:if test="${field != 'id'}">
                            <c:choose>
                                <c:when test="${field == 'linkPicture'}">
                                    <tr><td>${field}</td><td><input name="${field}"/></td></tr>                    
                                        </c:when>
                                        <c:otherwise>
                                    <tr><td>${field}</td><td><input name="${field}"/></td></tr>                    
                                        </c:otherwise>
                                    </c:choose>
                                </c:if>
                            </c:forEach>       


What expected as
<c:forEach var="field" items="${fields}">
    <c:if test="${field != 'id'}">
        <c:choose>
            <c:when test="${field == 'linkPicture'}">
                <tr><td>${field}</td><td><input name="${field}"/></td></tr>                    
            </c:when>
            <c:otherwise>
                <tr><td>${field}</td><td><input name="${field}"/></td></tr>                    
            </c:otherwise>
        </c:choose>
    </c:if>
</c:forEach>
Comment 1 Vladimir Riha 2012-05-02 14:49:17 UTC
Another case, format following:

==== CODE START ====
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
    <head><title></title></head>
    <body>
        <p>
    <c:if test="true">
<p cellpadding="5" border="1">
</p>
    </c:if>
    <p>
    <p>
    </body>
</html>
==== CODE END ====

Result is (notice end tag for c:if) :
==== CODE START ====
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
    <head><title></title></head>
    <body>
        <p>
            <c:if test="true">
            <p cellpadding="5" border="1">
            </p>
        </c:if>
        <p>
        <p>
    </body>
</html>
==== CODE END ====


Product Version: NetBeans IDE Dev (Build 201205020400)
Java: 1.7.0_04; Java HotSpot(TM) Client VM 23.0-b21
System: Linux version 3.0.0-17-generic-pae running on i386; UTF-8; en_US (nb)
Comment 2 fortruth 2012-09-29 03:10:33 UTC
Created attachment 125091 [details]
libs not sorted in java se project
Comment 3 fortruth 2012-09-30 13:10:37 UTC
(In reply to comment #2)
> Created attachment 125091 [details]
> libs not sorted in java se project

sorry, this attachments should be for case 218873.
Comment 4 Martin Balin 2016-07-07 08:56:22 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss