jsp.error.attribute.unterminated
I recently dealt with this error in some JSP code I was writing and did not see much information out there on a cause and solution so here is what I found out.
I had already tracked the problem down to some code that should have been correct:
<display:column property=”<%=rsmd.getColumnName(i)%>” title=”<%=rsmd.getColumnName(i)%> ”
sortable=”true” headerClass=”sortable” maxLength=”20″
/>
When I remove the after the the rsmd.getColumnName(i), it works correctly but when I add any other characters inside of the title value it fails.
The Problem: With the displaytag tablib you can not dynamically create strings from jsp and text inside of a key-value pair. You can place just JSP or just text inside the value but not the combination of both.
The Solution: Create a temporary String variable to hold the value you would like to place in the value pair and then only reference that string.
<% String columnTitle = rsmd.getColumnName(i) + “ ”;%>
<display:column property=”<%=rsmd.getColumnName(i)%>” title=”<%=columnTitle%>”
sortable=”true” headerClass=”sortable” maxLength=”20″
/>
Hope this helps someone else,
Richard
August 18th, 2006 at 11:51 am
Hi Richard. This has helped tremendously.
Thanks!