How do you suppress warnings (or even errors) in a jsp fragment file in Eclipse?
I have this jspf that I include in the middle of the jsp file, but that jspf relies on a variable further up in the code before it is included. However, even though all works fine, every time I validate my codes (before deployment), Eclipse marks that jspf with an error. I can safely ignore the error and proceed with the deployment, but is there a way to remove that error through a suppress warning annotation in that jspf file?
main.jsp:
<%
String someVariable = "foo.bar";
%>
<% @ include file="WEB-INF/jspf/sample.jspf" %>
WEB-INF/jspf/sample.jspf
<%
// shows unresolved local variable error when validated
// but can still deploy just fine if error is ignored
if(someVariable != null && someVariable.length() > 0)
out.println(someVariable);
%>
The example above is very simple, but sample.jspf will never be called directly from URL. It will always be included in some other jsp file. Now how to remove error mark in Eclipse when validating?