Reputation: 953
I need a mechanism that remove my comments from view, something like a filter in web.xml
. It is better if this filter works on every files(e.g. javascript,css, ...) not only JSPs.
comment sample in JSP file :
<script>
//var time = null;
</script>
Upvotes: 0
Views: 399
Reputation: 755
Use JtidyFilter by setting hide-comments to true.This will strip HTML comments out of a page generated with JSP/JSTL.
http://jtidy.sourceforge.net/multiproject/jtidyservlet/filter.html
<init-param>
<param-name>config</param-name>
<param-value>hide-comments: true</param-value>
</init-param>
Upvotes: 1