Re: AW: modified jsp-files and jasper2

2003-02-16 Thread Sean Dockery
Hello, Sven.

Try setting Context.reloadable to true, restart Tomcat, and see if that
works for you.



Sven Köhler [EMAIL PROTECTED] wrote in message
b2m0cd$9pb$[EMAIL PROTECTED]">news:b2m0cd$9pb$[EMAIL PROTECTED]...
  I just checked the web.xml file in $CATALINA_HOME/conf/web.xml.  It
  suggests
  the development is the default mode in which Jasper operates.  Have
you
  tried leaving development, reloading, and checkInterval out of your
  web.xml
  file to see if the standard behavior works?
 
  The tomcat-docs also state, that development should be false in
  production-environment. background should be used, because it's more
  efficient.

 Today i uploaded new pages, and there we're compiled fine, than i
 uploaded some updated pages, and they weren't compiled at all.
 I tried the reload-button in the manager-app, nothing happened.

  Even with development=true i remember some cases, where tomcat didn't
  reload the pages, and i had to hit the reload-button.

 I thought of what you said, and set the development-option to true, and
 restarted tomcat.
 It didn't help. I still saw the old pages. Even after that restart
 Tomcat didn't recompile my pages!!!

  Hitting the reload-button in the manager-app always helps.

 As i know now, this doesn't help always, but nearly always.

 As development==false implied, that background-compilation is disabled,
 nothing should keep me from seeing the new page!
 the opposite of background-compilation (development=true) is that the
 page is recompiled before the http-request is executed.

 Any hints?

 I think i will submit a Bug-Report.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: AW: modified jsp-files and jasper2

2003-02-15 Thread Sven Köhler
I just checked the web.xml file in $CATALINA_HOME/conf/web.xml.  It suggests
the development is the default mode in which Jasper operates.  Have you
tried leaving development, reloading, and checkInterval out of your web.xml
file to see if the standard behavior works?


The tomcat-docs also state, that development should be false in 
production-environment. background should be used, because it's more 
efficient.

Even with development=true i remember some cases, where tomcat didn't 
reload the pages, and i had to hit the reload-button.

Hitting the reload-button in the manager-app always helps.


It shouldn't help; it either works or it doesn't.  You should also note that
there can be several seconds lag associated with having Tomcat actually
carry out a reload.

[ Aside:  Does manager/reload fail if Context.reloadable=false? ]


reloadable should be renamed into autoreload.
that's what it is for.
if reloadable==true then tomcat checks the files in the WEB-INF-folder 
for modifications.

You have not mentioned your reloadable settings in server.xml.  I am
inclined to believe that reloading class files for a web application is
handled in one place--no matter where those file reside.


it is false, because i don't want auto-reload.


I suggested 60 seconds for this...

1) There has been a change.
2) Jasper translates the file.
3) Jasper compiles the file.
4) Tomcat takes up to 15 seconds at this point to determine that it needs to
reload a class file.

I wasn't implying that the checkInterval number was useless--just that there
is more processing to reloading a class than mere class file datetime compar
isons.


OK, but a few hours time should be enough.


By your tone, it sounds like you only conducted this experiment once.


No, my client calls me all the time, and it's anoying.
It seems that i suffer a bug that nobody notices or cares about.


If I were you, I would start with the most simple system for base testing
and then add complexity in increments.  Consider goes with these phases:


I will do some tests when i have the time.


Reloading of applications does work for lots of people.  I am sure that if
you start from the baseline, you will discover something that was not
previously understood about how the reloading process works or perhaps work
a kink out of your configuration.


It cannot be my fault.
There has to be a bug. As i already told you, it sometimes work, and 
semetimes it doesn't.
I havan't noticed a tomcat-option which tells tomcat to randomize reloads.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: modified jsp-files and jasper2

2003-02-15 Thread Sven Köhler
I just checked the web.xml file in $CATALINA_HOME/conf/web.xml.  It 
suggests
the development is the default mode in which Jasper operates.  Have you
tried leaving development, reloading, and checkInterval out of your 
web.xml
file to see if the standard behavior works?

The tomcat-docs also state, that development should be false in 
production-environment. background should be used, because it's more 
efficient.

Today i uploaded new pages, and there we're compiled fine, than i 
uploaded some updated pages, and they weren't compiled at all.
I tried the reload-button in the manager-app, nothing happened.

Even with development=true i remember some cases, where tomcat didn't 
reload the pages, and i had to hit the reload-button.

I thought of what you said, and set the development-option to true, and 
restarted tomcat.
It didn't help. I still saw the old pages. Even after that restart 
Tomcat didn't recompile my pages!!!

Hitting the reload-button in the manager-app always helps.


As i know now, this doesn't help always, but nearly always.

As development==false implied, that background-compilation is disabled, 
nothing should keep me from seeing the new page!
the opposite of background-compilation (development=true) is that the 
page is recompiled before the http-request is executed.

Any hints?

I think i will submit a Bug-Report.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: modified jsp-files and jasper2

2003-02-14 Thread Sven Köhler
It can take up to 15 seconds (default) for Tomcat to poll for changes to
class files.  The frequency of how often Tomcat checks can be changed via
the Loader checkInterval property in the containing Context node.  Ensure
Context.reloadable and Loader.reloadable are not set to false; they are true
by default.


according to the docs, this config should do:

servlet
servlet-namejsp/servlet-name
servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
init-param
param-namelogVerbosityLevel/param-name
param-valueWARNING/param-value
/init-param
init-param
param-namecompiler/param-name
param-valuejikes/param-value
/init-param
init-param
param-namedevelopment/param-name
param-valuefalse/param-value
/init-param
init-param
param-namereloading/param-name
param-valuetrue/param-value
/init-param
init-param
param-namecheckInterval/param-name
param-value10/param-value
/init-param
load-on-startup3/load-on-startup
/servlet

BUT:
5 minutes ago, i had a case, where it didn't work.
The page was uploaded an hour ago, but you still couldn't see the 
correct page online. I checked the work-folder, and the jsp-page has 
_not_ been compiled. the old .java and .class file was still there.

Hitting the reload-button in the manager-app always helps.

we also uploaded another update of the same page, and this time, the 
jsp-page was recompiled, and we could see the new page - as it should 
normally be.

The reloadable property of the context shouldn't matter, because it's 
for the files in the WEB-INF-folder (it says, whether they can will be 
automatically reloaded or not)

hitting the reload-button in the manager-app shouldn't help at all, 
because the classes generated from JSP-files should be reloaded by Jasper.

Even if i'm wrong, it should always _not_ work, or always work, but not 
like it is now: it works sometimes, but not always

I am uncertain whether or not JSP files are included in this particular
check or if there is another layer elsewhere.  But a good guideline is to
wait for at least 60 seconds before testing newly uploaded JSP files.


You also tell me, that the checkInterval-Option of Jasper is completly 
useless? and i would have to wait 60sec?

We waited more than 60sec, but it didn't work.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: AW: modified jsp-files and jasper2

2003-02-14 Thread Ralph Einfeldt
Just a very wild guess:

Have you compared the date of the jsp file
with the corresponding java and class file?

Maybe the old class file is newer than the jsp file?

 -Original Message-
 From: Sven Köhler [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 14, 2003 10:04 AM
 To: [EMAIL PROTECTED]
 Subject: Re: AW: modified jsp-files and jasper2
 
 The page was uploaded an hour ago, but you still couldn't see the 
 correct page online. I checked the work-folder, and the jsp-page has 
 _not_ been compiled. the old .java and .class file was still there.
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: AW: modified jsp-files and jasper2

2003-02-14 Thread Sven Köhler
Have you compared the date of the jsp file
with the corresponding java and class file?

Maybe the old class file is newer than the jsp file?


i haven't done that yet, but as the date of machine is synchronized with 
a time-server it should always be correct.

i have also deleted the whole work-folder. i had this guess too.
but as all class-files should have been recreated, they should all have 
the correct date.

even reuploading the jsp-file doesn't help.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: AW: modified jsp-files and jasper2

2003-02-14 Thread Lorenz Beyeler
Another wild guess:
How is the upload done? What happens to the file date-time when uploading?

- Lorenz

 i haven't done that yet, but as the date of machine is 
 synchronized with 
 a time-server it should always be correct.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: AW: modified jsp-files and jasper2

2003-02-14 Thread Sean Dockery
Hi, Sven.

Down below...

- Original Message -
From: Sven Köhler [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, February 14, 2003 02:04
Subject: Re: AW: modified jsp-files and jasper2


  It can take up to 15 seconds (default) for Tomcat to poll for changes to
  class files.  The frequency of how often Tomcat checks can be changed
via
  the Loader checkInterval property in the containing Context node.
Ensure
  Context.reloadable and Loader.reloadable are not set to false; they are
true
  by default.

 according to the docs, this config should do:

  servlet
  servlet-namejsp/servlet-name

servlet-classorg.apache.jasper.servlet.JspServlet/servlet-class
  init-param
  param-namelogVerbosityLevel/param-name
  param-valueWARNING/param-value
  /init-param
  init-param
  param-namecompiler/param-name
  param-valuejikes/param-value
  /init-param
  init-param
  param-namedevelopment/param-name
  param-valuefalse/param-value
  /init-param
  init-param
  param-namereloading/param-name
  param-valuetrue/param-value
  /init-param
  init-param
  param-namecheckInterval/param-name
  param-value10/param-value
  /init-param
  load-on-startup3/load-on-startup
  /servlet

 BUT:
 5 minutes ago, i had a case, where it didn't work.
 The page was uploaded an hour ago, but you still couldn't see the
 correct page online. I checked the work-folder, and the jsp-page has
 _not_ been compiled. the old .java and .class file was still there.

I just checked the web.xml file in $CATALINA_HOME/conf/web.xml.  It suggests
the development is the default mode in which Jasper operates.  Have you
tried leaving development, reloading, and checkInterval out of your web.xml
file to see if the standard behavior works?

 Hitting the reload-button in the manager-app always helps.

It shouldn't help; it either works or it doesn't.  You should also note that
there can be several seconds lag associated with having Tomcat actually
carry out a reload.

[ Aside:  Does manager/reload fail if Context.reloadable=false? ]

 we also uploaded another update of the same page, and this time, the
 jsp-page was recompiled, and we could see the new page - as it should
 normally be.

 The reloadable property of the context shouldn't matter, because it's
 for the files in the WEB-INF-folder (it says, whether they can will be
 automatically reloaded or not)

 hitting the reload-button in the manager-app shouldn't help at all,
 because the classes generated from JSP-files should be reloaded by Jasper.

 Even if i'm wrong, it should always _not_ work, or always work, but not
 like it is now: it works sometimes, but not always

You have not mentioned your reloadable settings in server.xml.  I am
inclined to believe that reloading class files for a web application is
handled in one place--no matter where those file reside.

  I am uncertain whether or not JSP files are included in this particular
  check or if there is another layer elsewhere.  But a good guideline is
to
  wait for at least 60 seconds before testing newly uploaded JSP files.

 You also tell me, that the checkInterval-Option of Jasper is completly
 useless? and i would have to wait 60sec?

 We waited more than 60sec, but it didn't work.

I suggested 60 seconds for this...

1) There has been a change.
2) Jasper translates the file.
3) Jasper compiles the file.
4) Tomcat takes up to 15 seconds at this point to determine that it needs to
reload a class file.

I wasn't implying that the checkInterval number was useless--just that there
is more processing to reloading a class than mere class file datetime compar
isons.

By your tone, it sounds like you only conducted this experiment once.

If I were you, I would start with the most simple system for base testing
and then add complexity in increments.  Consider goes with these phases:

1) Simple local system...

a) Use a local development machine for this test.
b) Use a serverl.xml file with no reloadable configuration
Context.reloadable and Loader.reloadable set to true.
c) Use a web.xml file without org.apache.jasper.servlet.JspServlet
configuration information--use the default configuration.
d) Start Tomcat.
e) Access a jsp file using http://localhost:8080/...
f) Copy a file overtop the existing JSP (or modify the exiting JSP and save
it).
g) Access the jsp file again. (the default development configuration
should cause Jasper to translate and compile the JSP file)
h) Wait 15 seconds or so. (for the class reloader to finish its sweep)
i) Access the jsp file again.  (hopefully you will have witnessed a change
here)

Steps h and i may or may not be necessary because I don't know whether or
not Jasper prompts class reloading or lets that happen during standard
processing.

2) Simple remote system...

Same as (1) except

Re: AW: modified jsp-files and jasper2

2003-02-14 Thread Craig R. McClanahan


On Fri, 14 Feb 2003, Sean Dockery wrote:

 [ Aside:  Does manager/reload fail if Context.reloadable=false? ]

No ... explicitly reloading via the manager webapp does not care wither
reloadable was set to true or false.  Even when I'm developing a webapp, I
don't use the reloadable flag at all -- instead, I use the Ant custom
tasks included in Tomcat 4.1 so that I can just say ant reload whenever
I want the app to reload.  No more waiting until Tomcat noticies.

The reloadable flag also has nothing to do with whether an updated JSP
page gets recompiled or not -- that is done whenever the last modified
timestamp of the JSP source file is later than the last recompile time.
You can turn that check off by using the development parameter in
$CATALINA_HOME/conf/web.xml, but it is independent of webapp reloading.

Craig

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




AW: modified jsp-files and jasper2

2003-02-13 Thread Lorenz Beyeler
Hi Sven
Have you tried stopping and restarting Tomcat?
Sometimes it's also necessary to empty the browsers
cache and restart the browser.

Lorenz

 -Ursprüngliche Nachricht-
 Von: Sven Köhler [mailto:[EMAIL PROTECTED]]
 Gesendet: Donnerstag, 13. Februar 2003 13:18
 An: [EMAIL PROTECTED]
 Betreff: modified jsp-files and jasper2
 
 
 hi,
 
 i've got weired probles with tomcat, because he doesn't 
 compile/reload 
 modified jsp-files. perhaps it does compile it (haven't checked that, 
 yet) but even after hours i still see an old page.
 
 development if false, and the checkinterval is was set to 
 10/60/300 seconds.
 
 i don't know, if it is a bug in the backgound-compilation, because i 
 remember that tomcat didn't reload modified jsp-files while 
 development 
 was true.
 i didn't use tomcat for development, so i can't tell for sure.
 
 any ideas?
 
 Thx
Sven
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: AW: modified jsp-files and jasper2

2003-02-13 Thread Sven Khler
Have you tried stopping and restarting Tomcat?
Sometimes it's also necessary to empty the browsers
cache and restart the browser.


Hitting the reload-button of my browser should help, but it doesn't.
Reloading the application through tomcat's manager-app solves the 
problem, but that is not a sollution.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: AW: modified jsp-files and jasper2

2003-02-13 Thread John Trollinger
The web.xml file has settings for reloading jsp pages you might have to
change the settings you have there.  Also your browser might be caching
the pages so you can also turn off browser caching.

For jasper settings see the docs
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html

John

 -Original Message-
 From: news [mailto:[EMAIL PROTECTED]] On Behalf Of Sven Köhler
 Sent: Thursday, February 13, 2003 8:10 AM
 To: [EMAIL PROTECTED]
 Subject: Re: AW: modified jsp-files and jasper2
 
 
  Have you tried stopping and restarting Tomcat?
  Sometimes it's also necessary to empty the browsers
  cache and restart the browser.
 
 Hitting the reload-button of my browser should help, but it 
 doesn't. Reloading the application through tomcat's 
 manager-app solves the 
 problem, but that is not a sollution.
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: AW: modified jsp-files and jasper2

2003-02-13 Thread Sven Köhler
The web.xml file has settings for reloading jsp pages you might have to
change the settings you have there.  Also your browser might be caching
the pages so you can also turn off browser caching.

For jasper settings see the docs
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html


Thx for the Hint, but the reloading-paramter defaults to true, and i 
haven't set it to false.

I called it a weired problem, because it sometimes works, sometimes it 
doesn't. Even partially for some pages it works, for others it doesn't.

My client (which uploads jsp-pages via ftp) calls me one day, and it 
works perfectly after restarting tomcat, and two days later (nobody 
touched any options) and it doesn't work anymore :-(

I'm using Tomcat 4.1.18 under Linux.

Thx
  Sven



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: modified jsp-files and jasper2

2003-02-13 Thread Sean Dockery
It can take up to 15 seconds (default) for Tomcat to poll for changes to
class files.  The frequency of how often Tomcat checks can be changed via
the Loader checkInterval property in the containing Context node.  Ensure
Context.reloadable and Loader.reloadable are not set to false; they are true
by default.

I am uncertain whether or not JSP files are included in this particular
check or if there is another layer elsewhere.  But a good guideline is to
wait for at least 60 seconds before testing newly uploaded JSP files.

Sean Dockery
[EMAIL PROTECTED]
Certified Java Web Component Developer
Certified Delphi Programmer
SBD Consultants
http://www.sbdconsultants.com
- Original Message -
From: Sven Köhler [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, February 13, 2003 07:52
Subject: Re: AW: modified jsp-files and jasper2


  The web.xml file has settings for reloading jsp pages you might have to
  change the settings you have there.  Also your browser might be caching
  the pages so you can also turn off browser caching.
 
  For jasper settings see the docs
  http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html

 Thx for the Hint, but the reloading-paramter defaults to true, and i
 haven't set it to false.

 I called it a weired problem, because it sometimes works, sometimes it
 doesn't. Even partially for some pages it works, for others it doesn't.

 My client (which uploads jsp-pages via ftp) calls me one day, and it
 works perfectly after restarting tomcat, and two days later (nobody
 touched any options) and it doesn't work anymore :-(

 I'm using Tomcat 4.1.18 under Linux.

 Thx
Sven



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]