You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Alexander Piavka <pi...@cs.bgu.ac.il> on 2003/01/22 12:14:25 UTC

how do i make a context automatically reload jsp files then they change?

all i have found is reloadable option, the manuals says:
Set to true if you want Catalina to monitor classes in /WEB-INF/classes/
and /WEB-INF/lib for changes, and automatically reload the web application
if a change is detected. This feature is very useful during application
development, but it requires significant runtime overhead and is not
recommended for use on deployed production applications. You can use the
Manager web application, however, to trigger reloads of deployed
applications on demand.

 but this does not include jsp files, also ,as i understand, there is no
need to reload the whole web application if one jsp file changes.

 Thanks


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: how do i make a context automatically reload jsp files then they change?

Posted by Alexander Piavka <pi...@cs.bgu.ac.il>.
> Also try putting the following sub-element for your context (in server.xml)
> to reload your context after a specified interval. In the example below I am
> specifying auto-reloading after every 3 seconds
>
>  <Loader className="org.apache.catalina.loader.WebappLoader"
> loaderClass="org.apache.catalina.loader.WebappClassLoader"	checkInterval="3"
> />
> No need for reloadable to be true for JSP pages, unless you have java beans
> being used that are placed in the classes folder under WEB-INF.

 Thanks a lot this work fine. But according to this configuration the
context will be auto-reloaded every 3 seconds even if no jsp page has
changed, because reloadable=false. Isn't it better to make reloadable=true
also so that the context is reloaded only if the resources(jsp pages) have
changed.
As the manual says about checkInterval:
  The number of seconds between checks for modified classes and resources,
  if reloadable has been set to true. The default is 15 seconds
as i understand resources also include jsp pages outside /WEB-INF/classes/
and /WEB-INF/lib

 please advice, thanks




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


context reloading with allowLinking does not work in 4.1.18 for jsp

Posted by Alexander Piavka <pi...@cs.bgu.ac.il>.
  I have a context for jsp, inside the context root tree there are also links to directories on
 other file systems, i.e links which point outside from the context
 root tree (this is so since i need one jsp context for many users,so each
 link points to some user directory there he/she can place jsp files).
 So i had to enable allowLinking which works fine. But jsp files ,which are
 outside of the context root tree, do not get reloaded if they change.
 On the other hand file ,which are under context root tree, are reloaded
 ok.

 Here is the relevant part of my Context configuration:
 ...
 <Context path="/catalina/jsp" docBase="sys/jsp" debug="0"
          reloadable="true" crossContext="true" workDir="work/jsp">

       <Loader className="org.apache.catalina.loader.WebappLoader"
               loaderClass="org.apache.catalina.loader.WebappClassLoader"
               checkInterval="5" workDir="work/jsp" />

       <Resources className="org.apache.naming.resources.FileDirContext"
                      allowLinking="true" docBase="" />
 ...

  Thanks a lot.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


context reloading with allowLinking does not work in 4.1.18 for jsp

Posted by Alexander Piavka <pi...@cs.bgu.ac.il>.
 I have a context for jsp, inside the context root tree there are also links to directories on
other file systems, i.e links which point outside from the context
root tree (this is so since i need one jsp context for many users,so each
link points to some user directory there he/she can place jsp files).
So i had to enable allowLinking which works fine. But jsp files ,which are
outside of the context root tree, do not get reloaded if they change.
On the other hand file ,which are under context root tree, are reloaded
ok.

Here is the relevant part of my Context configuration:
...
<Context path="/catalina/jsp" docBase="sys/jsp" debug="0"
         reloadable="true" crossContext="true" workDir="work/jsp">

      <Loader className="org.apache.catalina.loader.WebappLoader"
              loaderClass="org.apache.catalina.loader.WebappClassLoader"
              checkInterval="5" workDir="work/jsp" />

      <Resources className="org.apache.naming.resources.FileDirContext"
                     allowLinking="true" docBase="" />
...

 Thanks a lot.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: how do i make a context automatically reload jsp files then they change?

Posted by Rommel Sharma <ro...@cisco.com>.
Also try putting the following sub-element for your context (in server.xml)
to reload your context after a specified interval. In the example below I am
specifying auto-reloading after every 3 seconds

 <Loader className="org.apache.catalina.loader.WebappLoader"
loaderClass="org.apache.catalina.loader.WebappClassLoader"	checkInterval="3"
/>

No need for reloadable to be true for JSP pages, unless you have java beans
being used that are placed in the classes folder under WEB-INF.

Regards,
Rommel Sharma.


-----Original Message-----
From: Alexander Piavka [mailto:piavka@cs.bgu.ac.il]
Sent: Wednesday, January 22, 2003 4:44 PM
To: Tomcat Users List
Subject: how do i make a context automatically reload jsp files then
they change?



all i have found is reloadable option, the manuals says:
Set to true if you want Catalina to monitor classes in /WEB-INF/classes/
and /WEB-INF/lib for changes, and automatically reload the web application
if a change is detected. This feature is very useful during application
development, but it requires significant runtime overhead and is not
recommended for use on deployed production applications. You can use the
Manager web application, however, to trigger reloads of deployed
applications on demand.

 but this does not include jsp files, also ,as i understand, there is no
need to reload the whole web application if one jsp file changes.

 Thanks


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>