Vinze
Vinze

Reputation: 2539

Is there an equivalent to java @SuppressWarnings in JSP

The question is in the title : "Is there an equivalent to java @SuppressWarnings in JSP ?"

Upvotes: 10

Views: 6701

Answers (2)

Brett
Brett

Reputation: 322

Yes, just use:

<%! @SuppressWarnings("unchecked") %>

Upvotes: 29

Eddie
Eddie

Reputation: 54421

If you are getting warnings in the code generated from a JSP (or in in-line code in a JSP), one solution is to move the problem code into a Servlet or into a utility class. That way you can mark it up to your heart's content, and your JSP has less Java code in it. Win-win!

Upvotes: 2

Related Questions