facebook

JSP compilation problem with comments

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #211999 Reply

    vdebernardi
    Member

    My Platform:
    Eclipse 3.0
    Build id: 200406251208
    MyEclipse 3.8.0 Beta-2

    My question:

    In a JSP, I have this line:

    <!–disabled=<%if (usersForThisElt.isEmpty()) {%>”false”<%}else{%>”true”<%}%>>–>

    When I compile this JSP with <jspc> Ant task there is no error (the compiler used is Jasper from Tomcat 4.1). When I try to compile it within MyEclipse I have the following message:

    “Syntax error on token “else”, delete this token”

    If I put a comment in each JSP tag (<%– xxxx –%>) it works fine…

    Why is there a difference between <jspc> and the MyEclipse JSP compiler ?

    Thanks for your help

    –Vincent

    #212006

    Riyad Kalla
    Member

    Vincent try <%– and –%> not normal HTML tags. JSP supercedes HTML comments and will get processed anyway, but server comments (<%– –%>) tell the app server to “ignore this content completely”.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: JSP compilation problem with comments

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