You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Scott Hodson <sc...@ubero.com> on 2001/12/11 19:00:40 UTC

Change an include file requires re-compiling all JSP that include it (?)

I come from an ASP background where we would frequently change include files
and see the results immediately.  However, in JSP, since JSP pages are
compiled into servlet classes, if I change an include file the JSP file
including it won't get re-compiled because the JSP hasn't changed, just the
include file.  Even if I restart Tomcat it still won't recompile the JSPs.
So for now every time I make a change to an include file I have to re-save
all of my JSPs so Tomcat forces a recompile.  That's a big pain.

Can somebody help me out here?  Is there a way to force re-compilation of
JSPs if the files they include ever change?
___________________________

Scott Hodson
(949) 709-4496 office
(949) 709-3890 fax
scott@ubero.com
http://www.ubero.com



Re: Change an include file requires re-compiling all JSP that include it (?)

Posted by Sreenivasan Genipudi <sr...@spincircuit.com>.
Hi ,


Can anyone tell me where I can I find the redirector file for  IPlanet 6  -
Tomcat 3.2.4
on Hp Unix.

Pls help me.

Thanks,
Sreeni

--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Change an include file requires re-compiling all JSP that include it (?)

Posted by Scott Hodson <sc...@ubero.com>.
Thanks, that did it.  I always thought <%@ include %> and <jsp:include%>
were functionally the same.  I'm still learning this stuff...

Sos del capital vos?  Por quien hinchas en futbol?  River?  Boca?  :=)

-----Original Message-----
From: Pablo Lillia [mailto:plillia@adea.com.ar]
Sent: Tuesday, December 11, 2001 10:30 AM
To: Tomcat Users List
Subject: Re: Change an include file requires re-compiling all JSP that
include it (?)


There are 2 ways to include a file:

<%@ include file="relativeURL" %> for static files, parsing JSP elements.

and

<jsp:include page="{reletiveURL |  <%= expression %> }" flush="true"    { />
|
         > [ <jsp:param name="parameterName" value="{parameterValue | <%=
expression%>}" /> ]+
         </jsp:include> }

You need the 2nd form. A simple example:

         <jsp:include page="include.jsp" flush="true" />

(from JSP Syntax V1.1)

Saludos

At 10:05 11/12/2001 -0800, you wrote:
>A couple of things you can do, both would be easier than resaving all the
>JSPs
>
>1. Delete the generated class files...
>
>2. Touch the JSP files.
>
>
>----- Original Message -----
>From: "Scott Hodson" <sc...@ubero.com>
>To: "Tomcat User" <to...@jakarta.apache.org>
>Sent: Tuesday, December 11, 2001 10:00 AM
>Subject: Change an include file requires re-compiling all JSP that include
>it (?)
>
>
> > I come from an ASP background where we would frequently change include
>files
> > and see the results immediately.  However, in JSP, since JSP pages are
> > compiled into servlet classes, if I change an include file the JSP file
> > including it won't get re-compiled because the JSP hasn't changed, just
>the
> > include file.  Even if I restart Tomcat it still won't recompile the
JSPs.
> > So for now every time I make a change to an include file I have to
re-save
> > all of my JSPs so Tomcat forces a recompile.  That's a big pain.
> >
> > Can somebody help me out here?  Is there a way to force re-compilation
of
> > JSPs if the files they include ever change?
> > ___________________________
> >
> > Scott Hodson
> > (949) 709-4496 office
> > (949) 709-3890 fax
> > scott@ubero.com
> > http://www.ubero.com
> >
> >
> >
>
>
>--
>To unsubscribe:   <ma...@jakarta.apache.org>
>For additional commands: <ma...@jakarta.apache.org>
>Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Change an include file requires re-compiling all JSP that include it (?)

Posted by Pablo Lillia <pl...@adea.com.ar>.
There are 2 ways to include a file:

<%@ include file="relativeURL" %> for static files, parsing JSP elements.

and

<jsp:include page="{reletiveURL |  <%= expression %> }" flush="true"    { /> |
         > [ <jsp:param name="parameterName" value="{parameterValue | <%= 
expression%>}" /> ]+
         </jsp:include> }

You need the 2nd form. A simple example:

         <jsp:include page="include.jsp" flush="true" />

(from JSP Syntax V1.1)

Saludos

At 10:05 11/12/2001 -0800, you wrote:
>A couple of things you can do, both would be easier than resaving all the
>JSPs
>
>1. Delete the generated class files...
>
>2. Touch the JSP files.
>
>
>----- Original Message -----
>From: "Scott Hodson" <sc...@ubero.com>
>To: "Tomcat User" <to...@jakarta.apache.org>
>Sent: Tuesday, December 11, 2001 10:00 AM
>Subject: Change an include file requires re-compiling all JSP that include
>it (?)
>
>
> > I come from an ASP background where we would frequently change include
>files
> > and see the results immediately.  However, in JSP, since JSP pages are
> > compiled into servlet classes, if I change an include file the JSP file
> > including it won't get re-compiled because the JSP hasn't changed, just
>the
> > include file.  Even if I restart Tomcat it still won't recompile the JSPs.
> > So for now every time I make a change to an include file I have to re-save
> > all of my JSPs so Tomcat forces a recompile.  That's a big pain.
> >
> > Can somebody help me out here?  Is there a way to force re-compilation of
> > JSPs if the files they include ever change?
> > ___________________________
> >
> > Scott Hodson
> > (949) 709-4496 office
> > (949) 709-3890 fax
> > scott@ubero.com
> > http://www.ubero.com
> >
> >
> >
>
>
>--
>To unsubscribe:   <ma...@jakarta.apache.org>
>For additional commands: <ma...@jakarta.apache.org>
>Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Change an include file requires re-compiling all JSP that include it (?)

Posted by Chris Tucker <ct...@epangea.com>.
Sorry, this is not true.  You can have JSP code in a file included through
<jsp:include ... />: the only difference between the two approaches is that
<jsp:include ... /> executes at runtime, whereas <%@include ... %> executes
at compile time.  Thus, <%@include ... /> can be seen as somewhat analogous
to a C #include statement, whereas <jsp:include ... /> is more like a Java
import statement.  When the server executes a <jsp:include ... /> it
dispatches a request to the indicated URL and includes the response from
that request in the document being served.  A <%@include ... %>, in
contrast, simply dumps in all of the (compiled) JSP code from the included
file into your compiled JSP servlet (i.e. there is no separate request
dispatching going on).

You will need to recompile all JSP's using a <%@include %> when the included
file is changed, but the same is not true of <jsp:include ... />'d files.

--Chris

-----Original Message-----
From: Jeff Kilbride [mailto:jeff@kilbride.com]
Sent: Tuesday, December 11, 2001 11:19 AM
To: Tomcat Users List
Subject: Re: Change an include file requires re-compiling all JSP that
include it (?)


If your included files don't contain any JSP code, you can use the
<jsp:include... /> directive. This directive includes the file at request
time, rather than page translation time -- so changes to your included file
will show up immediately.

If your included files contain JSP code, then you're stuck with using the
<%@ include... %> and you'll need to recompile all your JSPs whenever the
included file changes.

Thanks,
--jeff

----- Original Message -----
From: "Scott Hodson" <sc...@ubero.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, December 11, 2001 10:58 AM
Subject: RE: Change an include file requires re-compiling all JSP that
include it (?)


> 1) Where do they go?  I don't see them anywhere under my webapp's folder
(I
> thought they go in WEB-INF/classes but they're not there)
>
> 2) Blech, that's what I do now.  If I have 100 JSP files all including the
> same header file I'm doomed!
>
> -----Original Message-----
> From: James Chuang [mailto:dreadlord76@earthlink.net]
> Sent: Tuesday, December 11, 2001 10:06 AM
> To: Tomcat Users List
> Subject: Re: Change an include file requires re-compiling all JSP that
> include it (?)
>
>
> A couple of things you can do, both would be easier than resaving all the
> JSPs
>
> 1. Delete the generated class files...
>
> 2. Touch the JSP files.
>
>
> ----- Original Message -----
> From: "Scott Hodson" <sc...@ubero.com>
> To: "Tomcat User" <to...@jakarta.apache.org>
> Sent: Tuesday, December 11, 2001 10:00 AM
> Subject: Change an include file requires re-compiling all JSP that include
> it (?)
>
>
> > I come from an ASP background where we would frequently change include
> files
> > and see the results immediately.  However, in JSP, since JSP pages are
> > compiled into servlet classes, if I change an include file the JSP file
> > including it won't get re-compiled because the JSP hasn't changed, just
> the
> > include file.  Even if I restart Tomcat it still won't recompile the
JSPs.
> > So for now every time I make a change to an include file I have to
re-save
> > all of my JSPs so Tomcat forces a recompile.  That's a big pain.
> >
> > Can somebody help me out here?  Is there a way to force re-compilation
of
> > JSPs if the files they include ever change?
> > ___________________________
> >
> > Scott Hodson
> > (949) 709-4496 office
> > (949) 709-3890 fax
> > scott@ubero.com
> > http://www.ubero.com
> >
> >
> >
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Change an include file requires re-compiling all JSP that include it (?)

Posted by "Craig R. McClanahan" <cr...@apache.org>.
On Tue, 11 Dec 2001, Jeff Kilbride wrote:

> Date: Tue, 11 Dec 2001 11:18:52 -0800
> From: Jeff Kilbride <je...@kilbride.com>
> Reply-To: Tomcat Users List <to...@jakarta.apache.org>
> To: Tomcat Users List <to...@jakarta.apache.org>
> Subject: Re: Change an include file requires re-compiling all JSP that
>     include it (?)
>
> If your included files don't contain any JSP code, you can use the
> <jsp:include... /> directive. This directive includes the file at request
> time, rather than page translation time -- so changes to your included file
> will show up immediately.
>
> If your included files contain JSP code, then you're stuck with using the
> <%@ include... %> and you'll need to recompile all your JSPs whenever the
> included file changes.
>

There are no restrictions on using JSP pages (or servlets) in a
<jsp:include/> action at runtime.  This is commonly used, for example, in
a portal-type user interface where the page requested by the user is
essentially a "template" made up of <jsp:include> calls to get all of the
components -- each of which is dynamically created by its own JSP page.

The way to remember the difference (especially if you are a reformed C/C++
programmer :-) is this:

* The "<%@ include %>" directive happens at compile time,
  just like the "#include" directive of C or C++.

* The "<jsp:include />" action happens at runtime, and is
  just a subroutine call.  (In reality, it uses a
  RequestDispatcher from the Servlet API under the covers.)

> Thanks,
> --jeff
>

Craig McClanahan


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Change an include file requires re-compiling all JSP that include it (?)

Posted by Jeff Kilbride <je...@kilbride.com>.
If your included files don't contain any JSP code, you can use the
<jsp:include... /> directive. This directive includes the file at request
time, rather than page translation time -- so changes to your included file
will show up immediately.

If your included files contain JSP code, then you're stuck with using the
<%@ include... %> and you'll need to recompile all your JSPs whenever the
included file changes.

Thanks,
--jeff

----- Original Message -----
From: "Scott Hodson" <sc...@ubero.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, December 11, 2001 10:58 AM
Subject: RE: Change an include file requires re-compiling all JSP that
include it (?)


> 1) Where do they go?  I don't see them anywhere under my webapp's folder
(I
> thought they go in WEB-INF/classes but they're not there)
>
> 2) Blech, that's what I do now.  If I have 100 JSP files all including the
> same header file I'm doomed!
>
> -----Original Message-----
> From: James Chuang [mailto:dreadlord76@earthlink.net]
> Sent: Tuesday, December 11, 2001 10:06 AM
> To: Tomcat Users List
> Subject: Re: Change an include file requires re-compiling all JSP that
> include it (?)
>
>
> A couple of things you can do, both would be easier than resaving all the
> JSPs
>
> 1. Delete the generated class files...
>
> 2. Touch the JSP files.
>
>
> ----- Original Message -----
> From: "Scott Hodson" <sc...@ubero.com>
> To: "Tomcat User" <to...@jakarta.apache.org>
> Sent: Tuesday, December 11, 2001 10:00 AM
> Subject: Change an include file requires re-compiling all JSP that include
> it (?)
>
>
> > I come from an ASP background where we would frequently change include
> files
> > and see the results immediately.  However, in JSP, since JSP pages are
> > compiled into servlet classes, if I change an include file the JSP file
> > including it won't get re-compiled because the JSP hasn't changed, just
> the
> > include file.  Even if I restart Tomcat it still won't recompile the
JSPs.
> > So for now every time I make a change to an include file I have to
re-save
> > all of my JSPs so Tomcat forces a recompile.  That's a big pain.
> >
> > Can somebody help me out here?  Is there a way to force re-compilation
of
> > JSPs if the files they include ever change?
> > ___________________________
> >
> > Scott Hodson
> > (949) 709-4496 office
> > (949) 709-3890 fax
> > scott@ubero.com
> > http://www.ubero.com
> >
> >
> >
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Change an include file requires re-compiling all JSP that include it (?)

Posted by Micael Padraig Og mac Grene <ca...@harbornet.com>.
At 12:04 PM 12/11/01 -0800, you wrote:
> > 1) Where do they go?  I don't see them anywhere under my webapp's folder
>(I
> > thought they go in WEB-INF/classes but they're not there)
> >
> > 2) Blech, that's what I do now.  If I have 100 JSP files all including the
> > same header file I'm doomed!
>
>Under Unix, it would be simply "touch *.jsp", no need to do them
>individually


Look under /whatever/tomcat/work/

-- micael


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Change an include file requires re-compiling all JSP that include it (?)

Posted by James Chuang <dr...@earthlink.net>.
> 1) Where do they go?  I don't see them anywhere under my webapp's folder
(I
> thought they go in WEB-INF/classes but they're not there)
>
> 2) Blech, that's what I do now.  If I have 100 JSP files all including the
> same header file I'm doomed!

Under Unix, it would be simply "touch *.jsp", no need to do them
individually




--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: Change an include file requires re-compiling all JSP that include it (?)

Posted by Scott Hodson <sc...@ubero.com>.
1) Where do they go?  I don't see them anywhere under my webapp's folder (I
thought they go in WEB-INF/classes but they're not there)

2) Blech, that's what I do now.  If I have 100 JSP files all including the
same header file I'm doomed!

-----Original Message-----
From: James Chuang [mailto:dreadlord76@earthlink.net]
Sent: Tuesday, December 11, 2001 10:06 AM
To: Tomcat Users List
Subject: Re: Change an include file requires re-compiling all JSP that
include it (?)


A couple of things you can do, both would be easier than resaving all the
JSPs

1. Delete the generated class files...

2. Touch the JSP files.


----- Original Message -----
From: "Scott Hodson" <sc...@ubero.com>
To: "Tomcat User" <to...@jakarta.apache.org>
Sent: Tuesday, December 11, 2001 10:00 AM
Subject: Change an include file requires re-compiling all JSP that include
it (?)


> I come from an ASP background where we would frequently change include
files
> and see the results immediately.  However, in JSP, since JSP pages are
> compiled into servlet classes, if I change an include file the JSP file
> including it won't get re-compiled because the JSP hasn't changed, just
the
> include file.  Even if I restart Tomcat it still won't recompile the JSPs.
> So for now every time I make a change to an include file I have to re-save
> all of my JSPs so Tomcat forces a recompile.  That's a big pain.
>
> Can somebody help me out here?  Is there a way to force re-compilation of
> JSPs if the files they include ever change?
> ___________________________
>
> Scott Hodson
> (949) 709-4496 office
> (949) 709-3890 fax
> scott@ubero.com
> http://www.ubero.com
>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Change an include file requires re-compiling all JSP that include it (?)

Posted by James Chuang <dr...@earthlink.net>.
A couple of things you can do, both would be easier than resaving all the
JSPs

1. Delete the generated class files...

2. Touch the JSP files.


----- Original Message -----
From: "Scott Hodson" <sc...@ubero.com>
To: "Tomcat User" <to...@jakarta.apache.org>
Sent: Tuesday, December 11, 2001 10:00 AM
Subject: Change an include file requires re-compiling all JSP that include
it (?)


> I come from an ASP background where we would frequently change include
files
> and see the results immediately.  However, in JSP, since JSP pages are
> compiled into servlet classes, if I change an include file the JSP file
> including it won't get re-compiled because the JSP hasn't changed, just
the
> include file.  Even if I restart Tomcat it still won't recompile the JSPs.
> So for now every time I make a change to an include file I have to re-save
> all of my JSPs so Tomcat forces a recompile.  That's a big pain.
>
> Can somebody help me out here?  Is there a way to force re-compilation of
> JSPs if the files they include ever change?
> ___________________________
>
> Scott Hodson
> (949) 709-4496 office
> (949) 709-3890 fax
> scott@ubero.com
> http://www.ubero.com
>
>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>