Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 206963

Summary: JSP directives not allowed in tag itself
Product: [WebTools] WTP Source Editing Reporter: Nitin Dahyabhai <thatnitind>
Component: jst.jspAssignee: Nitin Dahyabhai <thatnitind>
Status: CLOSED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: major    
Priority: P3 CC: for.work.things
Version: 2.0   
Target Milestone: 3.0 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch
none
unit test none

Description Nitin Dahyabhai CLA 2007-10-19 19:05:27 EDT
JSP validation shows Errors on tags where attributes with @include directives in the tag itself, common enough to encapsulate something like preset event handlers.

This will generate problems: <BODY <%@ include file="commonEventHandlers.jspf" %> > 

This won't: <BODY> <%@ include file = "commonEventHandlers.jspf"%>

In the former case, everything after the first '%' is treated as Java source, causing various syntax validation problems to be reported.
Comment 1 Nitin Dahyabhai CLA 2007-10-23 03:19:43 EDT
This is really a 3-part bug:
1) recognize them in the parser and partitioner so they can be be syntax colored correctly
2) support them for JSP translation
3) support custom tag libraries when using them
Comment 2 Nitin Dahyabhai CLA 2007-10-30 18:20:15 EDT
Created attachment 81657 [details]
patch

Attaching first patch.  Most things work, but the partitioning of the embedded directive is incorrect so that the content is thought to be HTML instead of JSP.  Hyperlinking and syntax coloring do not work for it.
Comment 3 Nitin Dahyabhai CLA 2007-10-30 19:18:53 EDT
Created attachment 81667 [details]
unit test
Comment 4 Nitin Dahyabhai CLA 2007-11-01 01:47:09 EDT
Released for M3.
Comment 5 Nitin Dahyabhai CLA 2007-11-13 21:31:45 EST
Verified syntax errors not reported with S-3.0M3-20071112224942.