facebook

JSP Error Markers [Closed]

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

    Chanchal
    Member

    I have two issues regarding MyEclipse and JSP error markers:

    1) I have a jsp which is like a sub jsp that is it is included in multiple jsp’s and therefore has some in between HTML and jsp tags. For example it displays an HTML table with some java variables which have been declared in the parent jsp’s. Now since thoss variables have not been declared in the same jsp your jsp compilers says that those variables/params cannot be resolved(which is correct though) hence I get errors in that sub jsp and the whole project now has a red cross in Package Explorer. There should be a way to handle this scenario.

    2) There seems to be a bug with MyEclipse where I have a couple of 3 liner jsps with similar includes and some of them have a red cross in Package Explorer and some of them don’t and the ones that have the red cross have no problem indicators in the code view window which is correct as there is no problem with the code and file paths but this is inconsistent behavior. eg

    –the following jsps are fine–

    <<combined1.jsp>>
    <%@page contentType=”text/html”%>
    <%@taglib uri=’/WEB-INF/cewolf.tld’ prefix=’cewolf’ %>
    <%@include file=’combined1_inc.jsp’%>

    <<combined1-1.1.jsp>>
    <%@page contentType=”text/html”%>
    <%@taglib uri=’/WEB-INF/cewolf-1.1.tld’ prefix=’cewolf’ %>
    <%@include file=’combined1_inc.jsp’%>

    <<combined1_inc.jsp>>
    has some java code and is fine with no errors or problem markers

    –the following set similar to the one above but has red crosses in Package Explorer–

    <<overlay1.jsp>>
    <%@page contentType=”text/html”%>
    <%@taglib uri=’/WEB-INF/cewolf.tld’ prefix=’cewolf’ %>
    <%@include file=’overlay1_inc.jsp’%>

    <<overlay1-1.1.jsp>>
    <%@page contentType=”text/html”%>
    <%@taglib uri=’/WEB-INF/cewolf-1.1.tld’ prefix=’cewolf’ %>
    <%@include file=’overlay1_inc.jsp’%>

    <<overlay1_inc.jsp>>
    has some java code and is fine with no errors or problem markers

    Any way to resolve this.

    #211729 Reply

    Riyad Kalla
    Member

    1)

    Now since thoss variables have not been declared in the same jsp your jsp compilers says that those variables/params cannot be resolved(which is correct though) hence I get errors in that sub jsp and the whole project now has a red cross in Package Explorer. There should be a way to handle this scenario.

    There is, per the JSP spec, it is recommended for pages that cannot be compiled stand alone, that they be renamed to .jspf for “JSP Fragment”.

    2)

    There seems to be a bug with MyEclipse where I have a couple of 3 liner jsps with similar includes and some of them have a red cross in Package Explorer and some of them don’t and the ones that have the red cross have no problem indicators in the code view window which is correct as there is no problem with the code and file paths but this is inconsistent behavior. eg

    I don’t quite understand this, but first make the changes suggested in #1 and then in your Problems view, click the down arrow on the top right side, and go to Filters…, the make sure to hit “Select All” to make sure the problem view is showing you all problems from all editors and not accidentally hiding some of the JSP editor problems.

    #211787 Reply

    Chanchal
    Member

    Thanks for that Filter option helped me narrow down the problem.
    But there seems to be some issue with jsp compiler validation. As after fixing the code I was still getting that red cross in the Navigatior pane and error markers in the Code pane, I even tried the MYEclipse->Validate Selected JSP’s option on these files by right clicking. Eventually I just Cut the problem code saved the jsp hence getting rid of error markers and then pasted it back and saved it again and those error markers did not appear again.

    #211790 Reply

    Riyad Kalla
    Member

    That is strange… its possible that the JSP compiler/error markers got out of sync… sometimes a rebuild of the project fixes that.

    Sorry for the trouble, glad its wokring.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: JSP Error Markers [Closed]

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