facebook

JSP syntax error "insert } to complete body" incor

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #236552 Reply

    tcnesham
    Member

    I reopened a JSP file after I installed MyEclipse 4.0.0 and the JSP editor complains that I need to insert a “}” to complete the body. That is incorrect, the code runs fine and the eclipse parens matching feature confirms the matching curly braces. I get the error on a simple block like:

    <%for(int productCounter = 0; productCounter < selectedProductsBean.getProductsSize(); productCounter++)
    {
    %>
    <tr>
    <TD CLASS=”clsGridItem” width=10% align=”left”>
    <%=selectedProductsBean.getProductName(productCounter)%>
    </TD>
    </tr>
    <%
    } //this curly brace gets error
    %>

    Eclipse Version: 3.1.0
    Build id: I20050627-1435

    MyEclipse JSF Support
    Version: 4.0.0
    Build id: 20050829-4.0.0-GA

    No other plugins.

    TIA for any help.

    #236676 Reply

    Riyad Kalla
    Member

    I can’t reproduce this problem, I think the error is a red-herring and your problem is infact on another line. Can you send me the entire page to look at: support@genuitec.com ATTN Riyad, be sure to link to this thread so I know why I’m getting it.

    #236721 Reply

    tcnesham
    Member

    sure

    #236727 Reply

    Riyad Kalla
    Member

    I was able to fix the error by removing the space around your <style> tag at the top (top and bottom you had extra new line chars, I removed them) and then I put the } on the same line as the open/close scriptlet tag:
    <%}%> and the error disappeared.

    #236728 Reply

    tcnesham
    Member

    A little extra whitespace here or there? It sounds like the parser needs some tweaking. Anything between <% and %> probably should ignore spaces unless it’s like <% //” this comment has spaces ” %>
    But thanks for pointing out the issue.

    #236729 Reply

    Riyad Kalla
    Member

    I should clarify that I wasn’t justifying the errors, I agree with you they are likely erroenous. We’ll get them resolved for 5.0 most likely (big editor updates).

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: JSP syntax error "insert } to complete body" incor

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