- This topic has 3 replies, 2 voices, and was last updated 18 years, 3 months ago by Riyad Kalla.
-
AuthorPosts
-
Unnsse KhanMemberHello there,
I have three files:
1) index.jsp:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <%@ include file="header.html" %> <div id="bd"> Welcome to my site! <%@ include file="footer.html" %> </div> </body> </html>
2) header.html:
<head> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <title>Welcome</title> <!-- favicon --> <link rel="shortcut icon" type="image/x-icon"href="./images/favicon.ico"/> <!-- Standard reset and fonts --> <link rel="stylesheet" type="text/css" href="./stylesheets/body.css"> </head> <body id="mycss"> <!-- start: your content here --> <h1>Welcome.<em>[<a href="index.jsp">Home</a>]</em></h1> <!-- end: your content here -->
3) footer.html:
<div id="ft"> <hr> <center> <table border="0"> <tr> <td> <a href="credits.html">Credits</a> </td> <td> | </td> <td> <a href="feedback.html">Feedback</a> </td> <td> | </td> <td> <a href="sitemap.html">Site Map</a> </td> </tr> </table> <br> <center> Copyright © 2006 - All Rights Reserved </center> </center> </div>
Everything looks good when I deploy this onto Tomcat 5.5.9,
and test it in a browser, but in the Eclipse IDE’s Problems’ view
it keeps giving me the following errors:No start tag <body>
No start tag <div>for index.jsp, lines 7-8
As one can see, since the <body> start tag is located in header.html, why does
the MyEclipse plug-in not notice this from the JSP <%@ import file = “header.html” %>?It puts this red error (x) symbol on my index.jsp and even though everything works,
this error message / symbol is really annoying.Will definitely be a deterrent when I use the structure of these 3 files through out the rest of
my project…Can anyone suggest why MyEclipse is viewing this as an error?
Many, many thanks!
Riyad KallaMemberTHe problem is the HTML validator (the one spitting out the errors) doesn’t understand includes. I would suggest turning it off for that project. You can turn it off under Project Properties > MyEclipse > Validation.
Unnsse KhanMemberRiyad,
Per your suggestion, I did that and index.jsp STILL has the same errors…
Is it because I need to disable a particular JSP Validator?
Is my code wrong or is it because MyEclipse doesn’t understand the <%@ include file = “aFile.jsp” %>?
Many, many thanks!
Riyad KallaMemberIt depends on what the error is, you may need to clean/rebuild your project or right click on the project, go down to MyEclipse, then “Remove All Validation Markers”.
-
AuthorPosts