- This topic has 4 replies, 2 voices, and was last updated 20 years, 3 months ago by Riyad Kalla.
-
AuthorPosts
-
Joel Rosi-SchwartzMemberHi,
The JSP code below produces validation errors against the
<tr>
elments. The error is
invalid location for tag tr
. In my actual code I get bogus errors against the
<p/>
tag that indicates
No start tag <p>
when there is.
I also do not get previewer output, but I suppose that is to be expected.
I this something I am doing wrong or is it a MyEclipse problem?
Thanks,
Joel<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/jsp_2_0" > <jsp:directive.page language="java" /> <jsp:directive.page contentType="text/html" /> <html> <head> <title>My Title</title> </head> <body> <table border="0" width="90%"> <tr> <td width="50%"><p>Stimulus</p></td> <td width="50%"><p>Action/Response</p></td> </tr> <tr valign="top"> <td width="50%"><p>This is text</p></td> <td width="50%"> <table border="0"> <tr valign="top"> <td width="50%"><p>More text</p></td> </tr> </table> </body> </html> </jsp:root>
Riyad KallaMemberJoel,
This was actually brought up in another thread, according to HTML spec <tr> tags are suppose to occur only within <tbody> tags… but we know that no one uses tbody tags so we are looking at relaxing this.Also you might have some trouble disabling HTML validation to work around this as there are some known bugs (soon to be fixed) with validation.
Joel Rosi-SchwartzMemberRiyad,
Thanks for the reply. I do understand that there are JSP problems that you folks are addressing. Is there any reason I am getting the errors against the <p> tag in my page. That page is has a lot of dependencies so I do not think it would be useful for me to send it to you. If this is also a know problem I then no problem, otherwise I will have to try to come up with a simply test case for you.
I have also put the <tbody> in place. The errors all disappear, but the page still does not preview. Any ideas?
Cheers,
Joel<jsp:root version="2.0" xmlns:jsp="http://java.sun.com/jsp_2_0"> <jsp:directive.page language="java" /> <jsp:directive.page contentType="text/html" /> <html> <head> <title>My Title</title> </head> <body> <table border="0" width="90%"> <TBODY> <tr> <td width="50%"> <p>Stimulus</p> </td> <td width="50%"> <p>Action/Response</p> </td> </tr> <tr valign="top"> <td width="50%"> <p>This is text</p> </td> <td width="50%"> <tr valign="top"> <td width="50%"> <p>More text</p> </td> </tr> </TBODY> </table> </body> </html> </jsp:root>
Riyad KallaMemberJoel,
We fixed the preview problem internally last night (it was an issue with translation in certain cases that we weren’t working around), however I’m not sure about the </p> problem… I just tried your sample above and actually got an invalid action error on the jsp: Root element… I will PR this right now and see what we can find. Thank you for the sample!
Riyad KallaMemberJoel,
I checked with the dev and he had this to say about the page:The problem with this page is that the namespace used is not correct for the
latest versions packaged in the 1.4 library set’s jsp-api.jar file. The first
line should read:
<jsp:root version=”2.0″ xmlns:jsp=”http://java.sun.com/JSP/Page”>
to validate properly. This is a user config problem as once the change is made,
it validates properly. Of course, the other option is to specify an alternative
jar the actually defines whatever that URI really is. Changing it to be correct
is easier, though.So maybe give that a try and see if it works.
-
AuthorPosts