Results 1 to 5 of 5

Thread: STS 3.1 default installation reports errors for all Java variables used on JSP child

  1. #1
    Join Date
    Dec 2012
    Posts
    7

    Default STS 3.1 default installation reports errors for all Java variables used on JSP child

    I found that STS 3.1 default installation reports errors for all Java variables used on JSP child page, which are defined in the parent page.

    For example, a JSP parent page p.jsp defines the following JAVA variables and includes a child JSP file c.jsp.
    <%

    int j = 0;
    String attrValue = attrValues[attrIDElement.intValue()];
    %>
    <%@ include file="/c.jsp" %>
    <%

    %>

    The child JSP file c.jsp uses the above JAVA variables defined in p.jsp
    <%

    String addText = "addText" + j++;
    String destList = "destList" + j++;
    String idName = "idName" + j++;
    %>

    <%
    if(!attrValue.equals(""))
    {
    int start_index;
    int end_index;

    }
    %>

    Error message for variable j in c.jsp is “j cannot be resolved to a variable”.
    Error message for variable attrValue in c.jsp is “attrValue cannot be resolved”.

    It seems an issue of configuration of STS, since those pages work. If so, how to configue it?

    Thanks for anyone for any help about it.

    David

  2. #2
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,638

    Default

    Hey David!

    As far as I can see, this is a limitation of the jsp support in Eclipse Webtools. If you want, you could file an enhancement request for this at Eclipse:

    https://bugs.eclipse.org/bugs/enter_...urce%20Editing

    Sorry!
    -Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  3. #3
    Join Date
    Dec 2012
    Posts
    7

    Default

    Thank you, Martin.

    David

  4. #4
    Join Date
    Dec 2012
    Posts
    7

    Default

    The error icons on the files are annoying.How to remove those icons and error reports through the setting? or how to disable those things?

  5. #5
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,638

    Default

    Hey!

    Did you take a look at the validation settings in the preferences (for Web -> JSP)?

    HTH,
    Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •