facebook

JSP editor + JSP include error

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

    I have one JSP that uses

    <%@ include file="_include.jspf"%>

    to include another JSP fragment file.

    The included file contains a Struts tag that maps a request parameter onto the page:

    
    <%@ taglib uri="/tags/bean"    prefix="bean"%>
    <%@ taglib uri="/tags/logic"    prefix="logic"%>
    <logic:present parameter="h2">
        <bean:parameter id="header" name="h2"/>
        <h2><%=header%></h2>
    </logic:present>
    

    If this included JSP code is pasted into the surrounding JSP file, it works OK.
    – It also works OK if included, but when included, the ME JSP editor marks the filename to be included in red, and complains:

    h2 cannot be resolved (in file: _include.jspf)
    #247339 Reply

    Riyad Kalla
    Member

    Is this in the left margin or right margin? Also when you see the error marked when the two pages are separate (header included in main page), does the error simply mark the line of the import and say “h2 cannot be resolved” or are you trying to use h2 in your main page somewhere and it’s marking that?

    #247379 Reply

    @support-rkalla wrote:

    Is this in the left margin or right margin? Also when you see the error marked when the two pages are separate (header included in main page), does the error simply mark the line of the import and say “h2 cannot be resolved” or are you trying to use h2 in your main page somewhere and it’s marking that?

    It is being marked on the right side margin, and the error message(s) only appear at the location of the include statement, not where e.g. variables declared in the include are being used.

    #247382 Reply

    Riyad Kalla
    Member

    I believe this is a known issue with the reconciler (real-time validation checking in right margin. Compile-time errors are shown in the left margin, those are the ones you should care about).

    I’ll report this to the JSP designer team, sorry about the inconvenience.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: JSP editor + JSP include error

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