Comment tag and jsp code tag issue [message #186357] |
Tue, 02 January 2007 16:18 |
Eclipse User |
|
|
|
Originally posted by: Kentzhou_ca.yahoo.com
I have a piece of code in jsp page as below in Eclipse. Becuase of jsp
scriplet code have been put inside a comment tag <!-- -->. So it should be
ignored by compilation.
But I got the error said:
Duplicate local variable permission
It seems look like that the comment tag not affect any code in <% ... %>.
I want to keep this commented codes inside the jsp page. How can I fixed
this issue?
<tr>
<j2ee:items numItems="5">
<td>
<!--
......
<%String permission = ((Product)
pageContext.getAttribute("myItem")).getPermission();
if (permission.equals("1")) {%>
......
<%}%>
-->
</td>
</j2ee:items>
</tr>
<tr>
<j2ee:items numItems="5">
<td>
<!--
......
<%String permission = ((Product)
pageContext.getAttribute("myItem")).getPermission();
if (permission.equals("1")) {%>
......
<%}%>
-->
</td>
</j2ee:items>
</tr>
|
|
|
Powered by
FUDForum. Page generated in 0.08154 seconds