Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Removing Comments During Build

Removing Comments During Build

2005-06-10       - By Tom Frantz
Reply:     1     2     3     4     5     6  

I want to be able to have comments in my code for JSP, HTML, JavaScript, ect.,
but I don't want those comments to show up on the user's browser when they use
"View Source".

I recently found out (the hard way) that excessive use of comments ends up
slowing the response time for the pages. Our web and app servers are in
Pittsburgh but our users are in Ireland.

I want the comments to remain with the source code, but I want them removed
when I build and deploy the application.

We use Ant to build so I'm thinking there might be a way to do this using Ant
tasks.

Just wondering how others are handling something like this.

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.