facebook

JSP validates HTML fragments

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #240852 Reply

    Sandor Mezei
    Member

    If I have a JSP or JSPF fragment/segment page that includes incomplete HTML markup, the validator wants to force me to start the page with an HTML tag.

    For example, a minimal JSP page named scratch.jspf that contains only,

    <div>a simple page</div>

    The validator complains “Invalid location of tag (div)”.

    I found a post indicting that this was not possible a year ago, due to limitations of the validator. Is there anyway to get this to work with the current 4.0.3 release? Or are there any plans in the future to make this work?

    Thanks.

    #240853 Reply

    Sandor Mezei
    Member

    My mistake, the post I referenced was posted a few months ago, not a year. So I’m assuming that this limitation still applies.

    #240855 Reply

    Scott Anderson
    Participant

    You could turn off Window > Preferences > MyEclipse > Editors > Common Editor Preferences > Analyze annotations while typing

    That should remove the warnings.

    #244054 Reply

    Eric
    Member

    Is there an ETA for getting this fixed? This problem will prevent me from purchasing MyEclipse. If my only options are to display invalid errors or not display any errors, then this plugin is totally worthless to me. Please make this a high priority for your next release. I currently have 4.0.3 GA.

    Thanks,
    Eric

    #244079 Reply

    Greg
    Member

    Eric,

    There is no easy way we can figure out how validate jsp/html fragments automatically. There needs to be some sort of context for how fragments plugin those files that include them. If we tried to figure this out dymancially it would not likely work for many different user variations. Our thought is that it would have to be user-defined context. We have throught of many ideas internally but we still are trying to get our hands on what exactly those requirements should be.

    If my only options are to display invalid errors or not display any errors, then this plugin is totally worthless to me

    Just out of curiosity, what tool have you used that will validate these incomplete HTML fragments? How does it work? We are still in the planning phase for this type of validation and would appreciate any user feedback.

    #244081 Reply

    Eric
    Member

    Greg,
    I don’t think I was clear in all my frustration. Let me clarify a bit.

    Right now, myeclipse is validating fragments (as defined in the prefs) as jsp files. The only way to prevent this is to turn off all JSP validation. This is my main frustration. I’m taking over an existing site and I’m getting 1000’s of errors, so it’s really hard to discern the real ones from the fragments.

    You have a very good point about validating fragments in general. Because fragments share the scope of the including page, the validator can’t figure out if something jsp is valid or not.

    However, you can still do a bit of html validation. Basically you can validate anything between an open and close tag of the same type that is in the fragment. It’ll probably be hard to implement because of how most validators work (using a stack), but I think it’s doable.

    Thanks,
    Eric

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: JSP validates HTML fragments

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