tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From August Detlefsen <>
Subject Re: triggering JSP page recompilation
Date Fri, 01 Feb 2002 22:10:44 GMT
If you are using includes for things like header and footer, have you
considered forwarding body content to a template page instead? 

Using the Jakarta-Taglibs request library:

You can do something like this: 


<%@ taglib uri="request.jar" prefix="req" %>

<req:setattribute name="content">

(HTML, JSP, etc - Whatever needs to go in the body of the page goes


<jsp:forward page="/template.jsp" />

TEMPLATE PAGE (template.jsp): 

(HTML header)

(HTML sidebar)

<%= request.getAttribute("content") %>

(HTML footer)

This way you can alter the template page to your heart's content and
never have to worry about recompiling the body pages. You can even have
multiple templates for each body page (for example if you want to have
a printer friendly version of a page without the navigation). 


--- Nick Wesselman <> wrote:
> >
> >
> >As I mentioned before, GNUJSP keeps a
> >record of what files include what, and if told to, recompiles all
> >including files when an included file changes.  
> >
> I don't recall gnujsp doing this--I've always had to touch files when
> I 
> change an included file with gnujsp as well.
> Nick
> --
> To unsubscribe:   <>
> For additional commands: <>
> Troubles with the list: <>

Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions!

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message