facebook

JSP/JSF validation: doesn’t recognize ‘\’ to escape quotes

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #272160 Reply

    fmurialdo
    Member

    I just installed MyEclipse and after adding Web and JSF capabilities, I can see the follow errors during Validation:

    It is complaining “Missing end tag” on <h:outputText, doesn’t like the “\” and show a warning for the value of href, onclick and class stating “Undefined attrbute names”.
    The source of the confusion apparently is the ‘\’.

    <h:outputText escape=”false”
    rendered=”#{backingBean.render}”
    value=”Hello<br/> <a href=\”javascript:void(0);\” onclick=\”popupWidget(this)\” class=’linkOpenWidget’>Click here</a> there”/>

    Any way to tune this ?

    Thanks.

    #272170 Reply

    Loyal Water
    Member

    <h:outputText escape=”false”
    rendered=”#{backingBean.render}”
    value=”Hello<br/> <a href=\”javascript:void(0);\” onclick=\”popupWidget(this)\” class=’linkOpenWidget’>Click here</a> there”/>

    There are loads of syntax errors in this tag. I suggest you go through a JSF tutorial to get an idea on how the tag works.

    #272505 Reply

    fmurialdo
    Member

    Why exact syntax errors are we talking about here? The only things MyEclipse is showing errors for are the quotes (doesn’t support escaping)
    The HTML output is:
    Hello<br><a href=”javascript:void(0);” onclick=”popupWidget(this)” class=”linkOpenWidget”>Click here</a>
    And the page is fully functional.
    What tutorial do you have in mind?

    #272529 Reply

    Loyal Water
    Member

    The way you have declared your anchor tag within your h:outputText tag is incorrect. Just google for some JSF tutorial and that should help.
    http://www.google.co.in/search?hl=en&q=JSF+quickstart+tutorial&meta=

    #272557 Reply

    fmurialdo
    Member

    Cool, I just learned today how to use Google. 🙂 Btw seems MyEclipse 5.5.1 GA out-of-the-box doesn’t contain the latest Web Tool Platform. As far as my specific question with escaping the quotes with Eclipse w/ WTP, I didn’t see any doc saying why you cannot put anything you want in the ‘value’ property: it is just a string. At the end, JSP compilation works fine and NetBeans 5.5 has also always been happy with that syntax. I guess the answer is stay away from this syntax or turn off WTP validation. (On top of that JSP 2.1 support is not there yet) Thanks.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: JSP/JSF validation: doesn’t recognize ‘\’ to escape quotes

You must be logged in to post in the forum log in