tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre Delisle <>
Subject Re: jsp:include not compiling modified jsp
Date Wed, 30 Aug 2000 16:45:25 GMT

The JSP spec defines two types of includes:

	1. the include directive
             <%@ include file="mypage.jsp" %>

        2. the include standard action
             <jsp:include page="mypage.jsp"/>

The include directive (1) happens at page translation time
(when the page is translated into a servlet). 
You will see the change made into your included page only
if the including one has also changed (because the translation
will re-occur).

The include standard action (2) happens at request time. Therefore any
change to your included file will show up in the including page.

You should use (2) to get the behavior you are expecting.


    -- Pierre

William Brogden wrote:
> Bill Pfeiffer wrote:
> >
> > I have a jsp that includes another jsp.  When I modify the included jsp and
> > run the "parent" jsp, the modified jsp does NOT get recompiled.
> >
> > Why is this?  Is it a bug or working as designed?  I can modify the parent
> > jsp and the included will also then be recompiled.  This is going to be a
> > real problem if I include the jsp into several parent page (say if the
> > included page was a header, which, in my case, it is).
> >
> > TIA,
> >
> > Bill Pfeiffer
> I would say that it is working according to spec. I think it checks
> the
> date on your primary page source versus the data on the .java code -
> since your primary page didn't change, it looks ok.
> --
> WBB -  Chief Scientist, LANWrights, Inc.
> Java Programmer Certification information and mock exam
> at

View raw message