facebook

JSP reconciler markers in 3.8.2 [Closed]

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • #219151 Reply

    erouse
    Participant

    I have started getting error indications where I was previously getting warnings, after I upgraded to 3.8.2. The error occurs in the following situation.

    I am using struts tiles. I have a jsp page that will be the body of the jsp page that uses the tile template. (following the struts book convention, it is a -body.jsp) The template jsp has a start tag and the -body.jsp has the close tag. I know this is not considered best practices, but it’s a holdover from the converstion away from the templates tag to the tiles tag.

    The close tag is considered to have an invalid location and no start tag. This was fine as a warning, but it is now an error. I would like to see this changed back to a warning or have some way to remove this as an error. We have hundereds of pages that have this pop up whenever we do an edit and it is becoming a problem with identifying the real errors from the false errors.

    Thanks.

    Oh, and we did consider trying to adjust the jsps to avoid this problem, but it will take too much time that we don’t have. It is, was, a low priority issue that we were looking at fixing in 6-9 months, but now that it is generating errors we need an immediate fix to remove them. Should I just uninstall the upgrade? Is it even possible?

    #219153 Reply

    Riyad Kalla
    Member

    erouse,
    You can first turn off HTML validation for this project to make sure that isn’t the issue (Right click project properties > MyEclipse-Validation > HTML).

    Next, if these pages are infact NOT valid JSP pages by themselves (e.g. they need their headers and footers to be valid) then according to JSP spec they should be named with a “jspf” extension meaning “JSP Fragment” or “JSP Segment”, that tells the compiler (and subsequently MyEclipse) “don’t both trying to compile these, they aren’t valid pages”.

    Can you give me an example of the types of errors you are seeing?

    #219190 Reply

    erouse
    Participant

    That is probably the case, but it doesn’t make me very happy. It still means editting the names of over 200 files and then editting about 100 more to use the new names. I guess i will have to live with it until I can spare the time to recode the tiles for the entire site.

    Just for my own edification, if a jsp doesn’t have or won’t create an html page with a <head> or <body> is it still considered valid? I started using jsps so long ago, the terms fragment and segmant were not part of the spec. And I haven’t refreshed my knowledge of the spec in the last 2-3 years. I got kinda lazy and have only been learning the the basic new stuff like EL, the JSTL and JSF. So changes to the spec have gone on by.

    Thanks

    #219193 Reply

    Riyad Kalla
    Member

    That is probably the case, but it doesn’t make me very happy. It still means editting the names of over 200 files and then editting about 100 more to use the new names. I guess i will have to live with it until I can spare the time to recode the tiles for the entire site.

    I agree, this can be a PIA but for now you can likely just turn off JSP Validation to work around the problems until a later time.

    Just for my own edification, if a jsp doesn’t have or won’t create an html page with a <head> or <body> is it still considered valid?

    Very good question, yes a “valid” JSP has nothing to do with the HTML content, it has to do with the page itself. For example, if you have a jsp Page that ONLY looks like this:

    user.jsp

    
    User Name: <%= userBean.getUserName() %>
    User Password: <%= userBean.getUserPassword() %>
    

    ** Compiler errors

    And that is it, that page is NOT a valid JSP page because you have not told the compiler where the “userBean” reference comes from, now if you had this:
    variables.jsp

    
    <% UserBean userBean = (UserBean)request.getAttribute("userBean"); %>
    

    ** VALID Page

    Then that is a valid page since it can stand on its own… now if we include the variables.jsp page in the user.jsp page, the compiler errors should disappear:
    user.jsp

    
    <%@ include file="variables.jsp" %>
    User Name: <%= userBean.getUserName() %>
    User Password: <%= userBean.getUserPassword() %>
    

    ** VALID Page

    But it is a good idea to name the “user.jsp” page “user.jspf” instead, since it will let the compiler know that this page *cannot* stand on its own as a valid JSP page.

    #219198 Reply

    erouse
    Participant

    I turned off HTML validation and am still getting ‘invalid tag location’ messages, but they’re warning again, not errors. I will play around with it for a few days and see if I can get it doing what I want. I tried changing one of the pages extension to jspf as a test and, if I turn off HTML validation, the warnings go away.

    Is there a way to specify by file extension which validators are used? I would like the HTML syntax validation to be used for html pages but ignored for jsp and jspf pages.

    #219203 Reply

    Riyad Kalla
    Member

    I turned off HTML validation and am still getting ‘invalid tag location’ messages,

    These might be legit warnings… what does the exactly @taglib entry look like? What does your web.xml entry for it look like? This FAQ entry might help explain how URIs in the taglib entries work: http://www.myeclipseide.com/FAQ+index-myfaq-yes-id_cat-31.html#251

    Is there a way to specify by file extension which validators are used?

    Not that I’m aware of, let me check on this.

    #219230 Reply

    Paul Stanton
    Member

    MyEclipse jsp editor is telling me i have uncaught exceptions in jsps that were previously fine. The error shows up on the RHS of the page, but does not show up in the ‘problems’ pane or the file tree. Turning jsp validation on/off has no effect on this.

    Also when I hit ctrl+space after typing a class name, the jsp editor replaces the name with the fully qualified name (ie: List -> java.util.List) instead of adding an import statement. This appears to be a regression.

    Is there anyway to return to the old behaviour without uninstalling 3.8.2?

    #219231 Reply

    Paul Stanton
    Member

    to clarify my versions

    myeclipse..
    Version: 3.7.200
    Build Id: 200407091200-3.8-Beta2

    eclipse..
    Version: 3.0.0
    Build id: 200406251208

    #219233 Reply

    Riyad Kalla
    Member

    pstanton,
    Please upgrade to MyEclipse 3.8.2 + QuickFix 2 before we continue, you are running a Beta of MyEclipse 3.8.0 and between the version you are running and MyEclipse 3.8.2 + QF2 there were probably 200+ bugs fixed and enhancements.

    #219235 Reply

    Paul Stanton
    Member

    where do i find the quickfix? its not listed in the downloads

    #219237 Reply

    Paul Stanton
    Member

    ok, i found and installed the quickfix. neither of the 2 problems aforementioned are fixed by this tho.

    #219238 Reply

    Riyad Kalla
    Member

    where do i find the quickfix? its not listed in the downloads

    Did you upgrade MyEclipse completely to 3.8.2 or just apply the quickfix ontop of your 3.8.0 Beta 2 install?

    I know you started this thread saying you were running 3.8.2, but when you printed out your build information it made me realize we are probably dealing with a bad/old install of sorts more than a bug… can you grab your Build ID from the Windows > Prefrences > MyEclispe menu for MyEclipse and tell me what it is? (Don’t use the Help > About menu, it doesn’t show the quickfix version)

    #219239 Reply

    Paul Stanton
    Member

    i installed the quickfix over 3.8.2. i realised after posting the version info .. i was looking at the wrong computer!

    #219240 Reply

    Paul Stanton
    Member

    the same symptoms are also occuring for another guy here with the same setup and he’s not getting any love either (same probs as me)

    #219242 Reply

    Riyad Kalla
    Member

    pstanton,
    First please tell me what the line of code is that is causing the “uncaught exception” error.

    Also the FQN issue is a regression that will be fixed in 3.8.3, sorry about the inconvenience.

Viewing 15 posts - 1 through 15 (of 24 total)
Reply To: JSP reconciler markers in 3.8.2 [Closed]

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