You could put the comment with the name in each of your include files, 
and embed it in logic that checks your setting.

Something like:
<c:if test="${applicationScope.showPageComments}">
<!-- /client1/page-top.jsp -->

Matt Pangaro
Lokitech >> software . strategy . design

Bernard Bernstein wrote:
> One of our UI coders have asked me if we could do this and I didn't  
> have an answer.
> We use many little jsp files with small chunks of our pages that we  
> piece together with <[EMAIL PROTECTED] ...%> directives. There are times when 
> a designer would like to see exactly which files were used to  
> generate a page from the browser as an xml comment.
> So, if I have some files included in one top-level file like this:
> <%@ include file="/client1/page-top.jsp" %>
> <%@ include file="/standard/page-body.jsp" %>
> <%@ include file="/client1/page-bottom.jsp" %>
> We'd like to have something like this show up in the page source:
> <!-- /client1/page-top.jsp -->
> This is the stuff at the top of the page
> <!-- /standard/page-body.jsp -->
> This is the body of the page
> <!-- /client1/page-bottom.jsp -->
> This is the bottom
> I know the simplest way to do this would be to insert the current  
> file name as a comment at the top of every .jsp file, but we'd also  
> like to be able to change a property somewhere and have those  
> comments disappear when we run this on a production server. Also, we  
> have hundreds of these snippet files and nobody wants to touch them  
> all nor have each one do something at runtime to figure out whether  
> or not to output something.
> Any suggestions?

resin-interest mailing list

Reply via email to