I tried to include an HTML file to my JSP but I eclipse show'd this error
The included file
<%@include file="includes/head.html" %>
And the error
Processing instruction not closed
And this is just the simple JSP
<%@include file = "includes/head.html" %>
<form action = "#" method = "POST">
Username: <input type = "text" name = "username"><br/>
Password: <input type = "password" name = "password"><br/>
</form>
</body>
</html>
This seems crazy but press ctrl + A,ctrl + x,paste and save the code,Bug is cleared
Also, closing the document and opening it again appears to work (please remember to save the document first).
Try giving a space after @.
Also if head.html is in other directory then absolute path should start with / or .. Try
<%@ include file="/includes/head.html" %>
ori try Anurag Priyadarshi answer but it didnt work. But i get rid of that error by restart the eclipse, u might wanna try it it works for me. :)
Select All, Backspace,Then ctrl+z to revert. works for me. But someone who knows eclipse well might shed some light as to why this happens
Save same code in new file by deleting the error file does worked for me.