- This topic has 7 replies, 2 voices, and was last updated 18 years, 2 months ago by Riyad Kalla.
-
AuthorPosts
-
warrenthebrownMemberIn MyEclipse 5.x, the following jsp snippet results in an error and a warning. There were no such problems with MyEclipse 4.x:
<%@ taglib uri=”/WEB-INF/struts-logic.tld” prefix=”logic” %>
…
<logic:notEmpty name=”wordListForm” property=”displayList”>
<div style=”height:200px; width:600px;overflow:auto”>
</logic:notEmpty> [No end tag (</div>).]
<logic:notEmpty name=”wordListForm” property=”displayList”>
</div> [No start tag (<div>).]
</logic:notEmpty>
Riyad KallaMemberWhen I paste in what I think you meant:
<logic:notEmpty name="wordListForm" property="displayList"> <div style="height:200px; width:600px;overflow:auto"> </logic:notEmpty> <logic:notEmpty name="wordListForm" property="displayList"> </div> </logic:notEmpty>
it works fine on my end with no errors.
NOTE: You didn’t actually mean the snippet above, line for line, with the [No end tag] notation in it did you? When I did that, I got two errors but I figured you were just annotating your post and not really using that as your code.
warrenthebrownMemberCorrect. I added the annotations that the jsp editor was displaying.
So, any theories as to why this would appear to work for you but not for me?
Remember that there was not a problem before upgrading from MyEclipse 4.x to 5.x (along with the requisite Eclipse upgrade).
Are you sure you do not see little yellow and red error bar indicators on the right side of the editor window?
Riyad KallaMemberCan you download this project and see if you get the warnings/errors? Do you see any differences between this and you example?
warrenthebrownMemberYou did not test the scenario I noted in my original memo. In particular, your code needs to look more like the following:
<body>
<logic:notPresent name=”tstlist”>
<div style=”height:200px; width:600px;overflow:auto”>
</logic:notPresent>
<logic:notPresent name=”wordListForm” property=”displayList”>
</div>
</logic:notPresent>
</body>
Riyad KallaMemberDoh, I ran “cleanup document” and it inserted opening and closing tags which, as you correctly pointed out, makes the HTML validator happy and hides the problem.
The problem is the HTML validator has no knowledge of tag behavior so it thinks it’s seeing a random end tag crossing over the boundry of the other taglib end tag. The workaround is to turn off the HTML validator for that project. I have filed it as a bug however and someone in another therad had this same issue I added your comments to.
warrenthebrownMemberThank you. My concern is mainly that there was not a problem in MyEclipse 4.x, but now there is a problem in 5.x
Riyad KallaMemberWe shipped the HTML validator off by default in 4.x, unless you manually turned it on, that is why you never saw the error. (we shipped it off for this reason, it was too pedantic. But it’s been improving so we ship it on now. In some cases, not enough though)
-
AuthorPosts