Community
Participate
Working Groups
Build Identifier: 20110218-0911 My project is using JSF inside JSPs. I just added an <h:commandButton> element to an existing page and I want the button text to be << (two less-than symbols). The code snippet from the page looks like this: <h:commandButton action="#{myBean.actionMethodName} value="<<"> The JSP Editor is now complaining of "No end tag (</h:commandButton>)" and "Start tag (<h:commandButton>) not closed". If I just ignore that JSP Editor errors, the page executes just fine. It should not be an error since quoted angle brackets are valid in this position. This is a problem for me, since now I have unfixable false errors in the JSP Editor for this page and I won't see real errors. Reproducible: Always Steps to Reproduce: 1. Open a JSP page with JSF content in the JSP Editor 2. Add an element similar to <h:commandButton action="#{myBean.actionMethodName} value="<<"> somewhere inside the <h:form> for this page
Curious, are the error messages occurring because of a mismatch of quotes for the attribute values? With your example, the action attribute value is without the closing double quote character in the <h:commandButton> tag. The action attribute would be the string literal, "#{myBean.actionMethodName} value=" rather than, "#{myBean.actionMethodName}" Does adding the double quote work for you? I was not able to reproduce (other than when the end tags was truly missing) but maybe I'm missing something.
This: <h:commandButton value="<"/> produces the following marker for me: Multiple annotations found at this line: - Start tag (<h:commandButton>) not closed properly, expected >. - No end tag (</h:commandButton>). If I add the second angle bracket: <h:commandButton value="<<"/> then I get a second "No end tag (</h:commandButton>)." added to the marker.
This: <jsp:include page="<<"></jsp:include> produces this marker: Start tag (<jsp:include>) not closed properly, expected >. The difference in the annotations is curious, but I think this shows that at its core, at least, this is not a JSF Tools issue.
Sorry for the typo in my original bug report, the code snippet should read: <h:commandButton action="#{myBean.actionMethodName}" value="<<"> I missed the closing quote for the action attribute value when I typed it in.
Adding Nick to review if this is an issue with JSP support
Yup, this looks to be a problem in our Parser. It looks like we're trying to build up a region for an embedded tag instead of treating it as static content. I know it's not a pretty work around, but it seems like that if any text is placed after the <, the validation message would go away. So "<<" or "<< " should eliminate the validation message.
Created attachment 194531 [details] patch
Code checked in.