You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rahul Joshi <ra...@ayokasystems.com> on 2005/07/12 02:50:46 UTC

Problem with refreshing JSP

Hello: 
 
I am using Tomcat5.5.7 with Eclipse environment. 
The problem I was facing was that inspite of changing or deleting & re-copying and compiling a JSP page (after re-starting the tomcat server), the browser was reading the old compiled file from work/Catalina/localhost/...
 
I solved the problem by deleteing the contents of work/Catalina/localhost. 
 
Is there a programmatic, I mean, by setting some Tomcat property solution to this??
 
Any help is greatly appreciated. Thanks!
Rahul.

Re: Problem with refreshing JSP

Posted by Travis Stevens <Tr...@noaa.gov>.
>> The other thing to note about reloading JSPs is that tomcat 5.5 seems 
>> to copy ones web context directory into its own webapps directory.  
>> Any changes to the original JSPs will not show up unless you 
>> physically copy the JSP from the original directory to the webapps 
>> directory.
>
>
> I haven't observed this behavior with my Tomcat 5.5.
> Maybe you have set antiResourceLocking="true" or something like this. 
> In this case I think tomcat will copy all the files.

I double checked and antiResourceLocking is false.  Is there some other 
configuration property somewhere that would indicate that the webapp is 
to be copied?  I use the 5.5.9 tomcat for Linux pretty much right out of 
the box.

-Trav

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Connection pool

Posted by Christoph Kutzinski <ku...@gmx.de>.
Start a new discussion thread instead of hijacking this one.

And if you do that: give more information. What have you done so far? 
have you read the documentation? What are the error messages, if you 
already at that point? etc. etc.

Sridhar wrote:
> Can anyone help how to create Connection Pool in Tomcat 5.0 with a 
> Oracle9i database.
> 
> This is very urgnet.......
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Connection pool

Posted by Sridhar <sr...@wicore.com>.
Can anyone help how to create Connection Pool in Tomcat 5.0 with a Oracle9i 
database.

This is very urgnet.......



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Problem with refreshing JSP

Posted by Christoph Kutzinski <ku...@gmx.de>.
Travis Stevens wrote:
> The other thing to note about reloading JSPs is that tomcat 5.5 seems to 
> copy ones web context directory into its own webapps directory.  Any 
> changes to the original JSPs will not show up unless you physically copy 
> the JSP from the original directory to the webapps directory.

I haven't observed this behavior with my Tomcat 5.5.
Maybe you have set antiResourceLocking="true" or something like this. In 
this case I think tomcat will copy all the files.


Christoph


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Problem with refreshing JSP

Posted by Travis Stevens <Tr...@noaa.gov>.
The other thing to note about reloading JSPs is that tomcat 5.5 seems to 
copy ones web context directory into its own webapps directory.  Any 
changes to the original JSPs will not show up unless you physically copy 
the JSP from the original directory to the webapps directory.

I use the maven:install goal which worked well with tomcat 5.0.  It 
created a directory (say /home/blah/project/target/project_name).  If I 
changed a JSP, I simply ran war:webapp which would
copy all the changed files into the said directory.  With tomcat 5.5, 
this does not work because the tomcat seems to care less about the 
specified directory after installing the webapp. 

To work around this, my web app build target (maven.war.webapp.dir) is 
now /home/blah/bin/tomcat/webapps/project_name (pointing directly to the 
tomcat installation).  At first I simply used the war:webapp goal, but 
the context.xml file was not picked up.  Now I used the tomcat:install 
goal again which builds the webapp in the tomcat webapps directory and 
then uses the tomcat manager to install the directory.  I should 
probably set autoDeploy to false so that conflicts do not occur between 
the auto deploy mechanism and the tomcat manager.

Anyway, I don't think this is an elegant solution, so if anyone has any 
other suggestions on how to handle this, please let me know.

-Trav

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Problem with refreshing JSP

Posted by Christoph Kutzinski <ku...@gmx.de>.
Rob Hills wrote:
> Hi Rahul,
> 
> On 12 Jul 2005 at 8:19, Rahul Joshi wrote:
> 
> 
>>It is Tomcat that has these compiled files which it continues to read
>>from work/Catalina/localhost/ instead of the new ones. The questions
>>is how do we make Tomcat clear or over-write these stored compiled
>>files. 
> 
> 
> If you set the "Reloadable" attribute of your application's Context element to "True" you will find that Tomcat will recompile any JSP file 
> shortly after it changes ( see http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html ).
> 
> As described in the documentation, this can slow down the performance of your application so it's best to switch it off on a production 
> server.

Actually reloadable="true" makes tomcat watch for changes  in 
/WEB-INF/classes/ and /WEB-INF/lib (see again 
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html ) 
which is indeed a costly operation.
Watching for changes to the JSPs is done somewhere else. If memory fails 
me not, it is in the server.xml file: an attribute of the JSPServlet 
element. Watching for JSP changes is not that costly. Unless you have a 
very high traffic site you can safely use it for your production site, too.


Christoph

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Problem with refreshing JSP

Posted by Rob Hills <ro...@netpaver.com.au>.
Hi Rahul,

On 12 Jul 2005 at 8:19, Rahul Joshi wrote:

> It is Tomcat that has these compiled files which it continues to read
> from work/Catalina/localhost/ instead of the new ones. The questions
> is how do we make Tomcat clear or over-write these stored compiled
> files. 

If you set the "Reloadable" attribute of your application's Context element to "True" you will find that Tomcat will recompile any JSP file 
shortly after it changes ( see http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html ).

As described in the documentation, this can slow down the performance of your application so it's best to switch it off on a production 
server.

Rob Hills
Western Australia

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Problem with refreshing JSP

Posted by Rahul Joshi <ra...@ayokasystems.com>.
Hi,
 
It is Tomcat that has these compiled files which it continues to read from work/Catalina/localhost/ instead of the new ones. The questions is how do we make Tomcat clear or over-write these stored compiled files. 
 
Thanks, Rahul.

Gurumoorthy <g....@btinternet.com> wrote:
Well,
Is it the browser or tomcat ? if it is the browser then you need to add the 
no-cache headers to the response ....

regards
Guru
----- Original Message ----- 
From: "Rahul Joshi" 
To: 
Sent: Tuesday, July 12, 2005 1:50 AM
Subject: Problem with refreshing JSP


> Hello:
>
> I am using Tomcat5.5.7 with Eclipse environment.
> The problem I was facing was that inspite of changing or deleting & 
> re-copying and compiling a JSP page (after re-starting the tomcat server), 
> the browser was reading the old compiled file from 
> work/Catalina/localhost/...
>
> I solved the problem by deleteing the contents of work/Catalina/localhost.
>
> Is there a programmatic, I mean, by setting some Tomcat property solution 
> to this??
>
> Any help is greatly appreciated. Thanks!
> Rahul.
> 


Re: Problem with refreshing JSP

Posted by Gurumoorthy <g....@btinternet.com>.
Well,
Is it the browser or tomcat ? if it is the browser then you need to add the 
no-cache headers to the response ....

regards
Guru
----- Original Message ----- 
From: "Rahul Joshi" <ra...@ayokasystems.com>
To: <to...@jakarta.apache.org>
Sent: Tuesday, July 12, 2005 1:50 AM
Subject: Problem with refreshing JSP


> Hello:
>
> I am using Tomcat5.5.7 with Eclipse environment.
> The problem I was facing was that inspite of changing or deleting & 
> re-copying and compiling a JSP page (after re-starting the tomcat server), 
> the browser was reading the old compiled file from 
> work/Catalina/localhost/...
>
> I solved the problem by deleteing the contents of work/Catalina/localhost.
>
> Is there a programmatic, I mean, by setting some Tomcat property solution 
> to this??
>
> Any help is greatly appreciated. Thanks!
> Rahul.
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org