• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP Pages and CVS

 
Ranch Hand
Posts: 430
Android VI Editor Debian
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi,

I have a lot of jsp files in CVS that are not compilable files. (e.g. *.html, *.jsp etc).
I use the following template on each new file that is checked in to cvs.




This means that whenever a file is update or modified and then checked in, a log is appended to the cvs history section of the jsp page at the top of the page . Here is an example



Now this is working very well. The only problem is that with pages that are not compilable, the revision history is also visible. For example on JSP pages, the cvs history is included in each page as html comments. So on the browser, if someone selects "View Source", they can view the source of the html/jsp page and the revision history of the page.

Is there a way to remove the revision history before deployment? I know i can use some unix tools like grep and cut to remove the revision history but i have a feeling it wont be a simple job to determine whether its a real comment or a cvs history comment. Is there an easier way to do this?

Thanks

its fine with compilable files e.g. (.java, .c etc) as these are not visible to the user as they run on the server side.
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
They're not visible because they're in comments, not because it's run on the server side.

JSPs, by the way, *are* compilable, and you can put the CVS comments in JSP comments as well. HTML, not so much; there are any number of ways to remove them including CVS hooks, deployment/build filtering, and so on. Depending on how they're being added (for instance, by looking for placeholders on checkin) you might just be able to remove the placeholder and it will no longer be added--so you'd do that for the HTML files.

All that said, I wouldn't bother putting that information in the files at all: it's noisy, doesn't provide any information you can't already get, putting the information in only *some* file types defeats the purpose, and is a relic of an earlier time.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I concur with David. I've been working with JSPs for over 10 years and have never kept that kind of information in them.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic