If you're writing a token parser it might be very clear to you what a line like this mean to your parser:
<td width="100%"
style="border-left: 1px solid #000; border-right: 1px solid #000;
<dhv:evaluate if="<%= !i.hasNext() %>">border-bottom: 1px
solid #000;</dhv:evaluate>">
Hard to spot isn't it?
Well, the problem is the second quote in the style attribute:
style="border-left: 1px solid #000; border-right: 1px solid #000;
<dhv:evaluate if="<%= !i.hasNext() %>">border-bottom: 1px
solid #000;</dhv:evaluate>">
Tomcat silently handles this incorrect code as correct and will continue.
OC4J on the other hand follows the JSP and Servlet Specifications very close and issues an error.
To solve this problem, you should:
- Read the quote character (") as parenthese and always translate it to open/close semantics.
- Use the right quote character for inner attribute values, eg.
<td width="100%"
style="border-left: 1px solid #000; border-right: 1px solid #000;
<dhv:evaluate if='<%= !i.hasNext() %>'>border-bottom: 1px
solid #000;</dhv:evaluate>">