Display JSP Variable to Console or Log

Ever wanted to display a JSP variable in your log or console? There is actually a pretty simple way to do this. Just add this code to your JSP.

<c:set var="debug">${variabletoview}</c:set>         

<jsp:useBean id="debug" type="java.lang.String" />

<% System.out.println("debug = "+debug); %>