Announcement Announcement Module
Collapse
No announcement yet.
STS 3.1 default installation reports errors for all Java variables used on JSP child Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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

    Comment


    • #3
      Thank you, Martin.

      David

      Comment


      • #4
        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?

        Comment


        • #5
          Hey!

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

          HTH,
          Martin

          Comment

          Working...
          X