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

Bug 190564

Summary: JSP semantics validator is not fired for JSF/JSPF files
Product: [WebTools] Java Server Faces Reporter: Vadim Dmitriev <dmgloss>
Component: CoreAssignee: Cameron Bateman <cameron.bateman>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: david_williams, thatnitind
Version: 2.0Flags: jlanuti: pmc_approved? (jgarms)
david_williams: pmc_approved+
jlanuti: pmc_approved? (raghunathan.srinivasan)
jlanuti: pmc_approved? (naci.dai)
jlanuti: pmc_approved? (deboer)
neil.hauge: pmc_approved+
raghunathan.srinivasan: review+
thatnitind: review+
Target Milestone: 2.0 RC3   
Hardware: PC   
OS: Windows XP   
Whiteboard: PMC_approved
Attachments:
Description Flags
Patch to fix by opening up the content types supported by the validator.
none
Original patch plus some sensitivity black box testing of changes none

Description Vadim Dmitriev CLA 2007-06-01 16:11:46 EDT
Build ID: I20070525-1350

Steps To Reproduce:
1. create simple jsf/jspf file with semantically wrong el expression and run validation on that file.
No warnings will be issued


More information:
Reproduced for WTP2.0 RC1.

Seems that semantics validation is just not associated with *.jsf/*jspf files. 
Added proper filters to extension point with id "JSFNonELAttributeValueValidator", works fine for me. Btw, why it called so, while that validation involves EL expressions?
Comment 1 Raghunathan Srinivasan CLA 2007-06-01 16:33:33 EDT
consider for 2.0
Comment 2 Cameron Bateman CLA 2007-06-06 16:48:07 EDT
Created attachment 70417 [details]
Patch to fix by opening up the content types supported by the validator.
Comment 3 Cameron Bateman CLA 2007-06-06 17:08:49 EDT
Created attachment 70420 [details]
Original patch plus some sensitivity black box testing of changes
Comment 4 Cameron Bateman CLA 2007-06-06 17:10:58 EDT
Patch attached.  Change if very targetted and simply expands the file extensions that the JSF framework will validate based on content type bindings for both JSP and JSP fragments.  Unit tests added to the main EL suite to ensure coverage of jspx, jsf and jspf files in addition to the current jsp tests that are performed.
Comment 5 Raghunathan Srinivasan CLA 2007-06-06 17:32:51 EDT
Approved for PMC review.
Safve fix to enable exisitng validation for additional file types (.jsf, .jspf). We have junits to cover these cases.
Comment 6 David Williams CLA 2007-06-06 17:51:29 EDT
Nitin, will you please review also? 


Is there a JSF "Content Type" ... should there be? Would that change this fix? 
Comment 7 Nitin Dahyabhai CLA 2007-06-07 02:21:49 EDT
(In reply to comment #6)
> Is there a JSF "Content Type" ... should there be? Would that change this fix? 

 We *do* have a different subtype for .tag files, but then only because they allow a different set of directives and actions.  A new JSF content type would mean altering parts of the patch.  We've tried very hard not to have one in the past as JSF files are fundamentally just special JSP files.  The patch does look to register the validator correctly for the JSP content type and would not run (which is what we want) on the tagsource content type.

Vadim's comment about the name of the validator should get some consideration in V3.
Comment 8 David Williams CLA 2007-06-07 03:45:34 EDT
Thanks Nitin. This patch sounds fine then. 

I will point out, though, that "JSF files are fundamentally just special JSP files" sure sounds like a new content type to me ... as a 'sub type' of JSP content type ... but if this is currently the only use of it, then agree there's no rush. 

Thanks all. 


Comment 9 Cameron Bateman CLA 2007-06-07 17:17:45 EDT
Patch applied.  
Comment 10 Vadim Dmitriev CLA 2007-09-22 06:36:47 EDT
Verified in 2.0.1RC3 (20070921180805)