Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352048 - Corrupted syntax highlighting for jsp with struts tags
Summary: Corrupted syntax highlighting for jsp with struts tags
Status: CLOSED DUPLICATE of bug 152620
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: jst.jsp (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: jst.jsp CLA
QA Contact: Nick Sandonato CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-13 23:27 EDT by SChan CLA
Modified: 2011-07-14 10:56 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SChan CLA 2011-07-13 23:27:34 EDT
Build Identifier: 20110218-0911

The current syntax highlighting treat all jsp the same and does not handle well for special tags, like struts tags. Take the following as an example:

        <p><s:if test="balance<=0">Error</s:if></p>

This works perfect and is correct for struts, but Eclipse just treat jsp like xml, so the '<' within the struts tag's attribute will mess up the syntax highlighting. Eclipse warns error and make the whole screen of text underlined with red lines. That's really annoying because the text becomes hard to read. 

Even if Eclipse text editor doesn't support special tags like struts tags, I wish Eclipse would provide an option for us to turn off the syntax highlighting. 

Reproducible: Always

Steps to Reproduce:
1. Use correct struts tags within the jsp document, but makes the whole document invalidate with xml specified syntax, e.g.:

<a<s:if test="isLink"> src="/somelink/page.html">Link</a</s:if><s:else>name="anchor" /</s:else>>

2. Eclipse text editor gives warning and its syntax highlighting doesn't work for the rest of the document
Comment 1 Nick Sandonato CLA 2011-07-14 10:56:59 EDT
Hi and thanks for your bug report. We've fixed the problem with less thans in attribute values in Indigo as part of Bug 345999. So your scenario of
     <p><s:if test="balance<=0">Error</s:if></p>
will work.

However, the other part of this where the end tag is conditionally generated is already an acknowledged problem outlined by Bug 152620.

*** This bug has been marked as a duplicate of bug 152620 ***