You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Barry Kimelman <bk...@sympatico.ca> on 2005/03/25 16:51:32 UTC

Tomcat rookie needs help updating project

My system is a PC run by Windows XP.
I am running version 5.5.8 of Tomcat
I am running version 1.6.2 of Ant

I can successfully compile and install a new project with no problems. I can
then successfully run the project by visiting the appropriate URL in my
browser.

However when I make a change to my project either by recompiling some of my
Java source code or by modifying some of JSP and/or HTML files, how do I get
Tomcat to "recognize" these changes ? If I run the command "ant reload" from
the DOS command line, when I rerun my application I do not see my changes.
What do I need to do to install project changes ?


*************************
 
Barry Kimelman
Toronto, Ontario, Canada
email :  bkimelman@sympatico.ca , bkimelman@hotmail.com

How to update webapp on many Tomcats ???

Posted by Neil Upfalow <ne...@iamodules.com>.
How can I best update a webapp that is running on tomcat instances
running on many different linux servers ?

I made a JSP that downloads a file from a central server and extracts
it. Problem is permissions don't get set as I want for those files. Java
has no permission ability. I suppose I could use a runtime exec() to
untar with permissions.

2nd problem is how to best restart the tomcat webapp? Modify the web.xml
? is there a simple example to restart it? My hosting company uses
tanuki wrapper on the JVM. Tomcat has it's programmatic API manager. 

Any ideas ?

Sincerely,
Neil Upfalow
 
ail: 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


Re: Tomcat rookie needs help updating project

Posted by "t.n.a." <tn...@sharanet.org>.
Barry Kimelman wrote:

> My system is a PC run by Windows XP.
> I am running version 5.5.8 of Tomcat
> I am running version 1.6.2 of Ant
>  
> I can successfully compile and install a new project with no problems. 
> I can then successfully run the project by visiting the appropriate 
> URL in my browser.
>  
> However when I make a change to my project either by recompiling some 
> of my Java source code or by modifying some of JSP and/or HTML files, 
> how do I get Tomcat to "recognize" these changes ? If I run the 
> command "ant reload" from the DOS command line, when I rerun my 
> application I do not see my changes. What do I need to do to install 
> project changes ?
>
Well, one obvious thing you could do is restart tomcat: it takes about 
10 s, but it works.
If you use eclipse with the sysdeo plugin as your IDE (which I highly 
recommend), you can relead the project without a tomcat restart using a 
command from a project pop-up menu.
If you don't use eclipse, I suggest you read up on the manager 
application that comes with tomcat as loading and unloading projects is 
it's responsibility.

Regards,
Tomislav

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


Re: Tomcat rookie needs help updating project

Posted by "Jon Cline - Enthusiast, Inc." <jc...@gmail.com>.
Hey Neil,

I believe you can also send a url string to the manager application
which will cause the webapp to reload:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/manager-howto.html

jc


On Fri, 25 Mar 2005 11:52:05 -0500, Neil Upfalow <ne...@iamodules.com> wrote:
> I thought Reloadable set to true will only work for JSPs? Will that
> allow classes to be reloaded as well ?
> What would trigger that?
> I'm trying to produce an inhouse solution to keep a large number of
> hosted linux server's tomcat web apps on the same code base.
> I figured I had to find a way to programmatically make tomcat restart
> the web app. No idea how yet, other than writing to web.xml to modify it
> or looking into tomcat API .
> 
> Any ideas?
> 
> Sincerely,
> Neil Upfalow
> 
> 
> -----Original Message-----
> From: Steve Lianoglou [mailto:lists@arachnedesign.net]
> Sent: Friday, March 25, 2005 11:43 AM
> To: Tomcat Users List
> Subject: Re: Tomcat rookie needs help updating project
> 
> > However when I make a change to my project either by recompiling some
> > of my Java source code or by modifying some of JSP and/or HTML files,
> > how do I get Tomcat to "recognize" these changes ? If I run the
> > command "ant reload" from the DOS command line, when I rerun my
> > application I do not see my changes. What do I need to do to install
> > project changes ?
> 
> If you set reloadable="true" in your web-app context (see my previous
> post), tomcat should also recognize any changes to the WEB-INF folder
> and reload the webapp context automatically w/o taking down the whole
> server.
> 
> Or, if you don't set reloadable="true" .. just click "reload" for the
> webapp in the tomcat manager app.
> 
> hope that helps,
> 
> -steve
> 
> ---------------------------------------------------------------------
> 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
> 
> 


-- 
|||||||||||||||||||||||||||||||||||||||||||||

Jon Cline
Chief Product Evangelist
Enthusiast, Inc
www.enthusiastinc.com
jcline@enthusiastinc.com
626.256.3505

|||||||||||||||||||||||||||||||||||||||||||||

*Need help?  Email support@enthusiastinc.com

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


Re: Tomcat rookie needs help updating project

Posted by Steve Lianoglou <li...@arachnedesign.net>.
> I thought Reloadable set to true will only work for JSPs? Will that
> allow classes to be reloaded as well ?
> What would trigger that?

Hmm .. I may be delerious, but I feel like when reloadable="true", the context gets reloaded whenever something 'changes' in the WEB-INF dir .. let's see ...

got this from the docs:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/context.html
(Tomcat 4, but I'm a bit lazy to go to tommcat 5, and I can't imagine it changing too much)

reloadable:

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.

> I figured I had to find a way to programmatically make tomcat restart
> the web app. No idea how yet, other than writing to web.xml to modify it
> or looking into tomcat API .

Hmm .. nothing ingenious .. what if use some lo-tech style of a shell script that justs request the correct url to reload a particular webapp context ...

The Eclipse sysdeo plugin has a way of telling a context to reload ... might be something to look into.

-steve

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


RE: Tomcat rookie needs help updating project

Posted by Neil Upfalow <ne...@iamodules.com>.
I thought Reloadable set to true will only work for JSPs? Will that
allow classes to be reloaded as well ?
What would trigger that?
I'm trying to produce an inhouse solution to keep a large number of
hosted linux server's tomcat web apps on the same code base. 
I figured I had to find a way to programmatically make tomcat restart
the web app. No idea how yet, other than writing to web.xml to modify it
or looking into tomcat API .

Any ideas?

Sincerely,
Neil Upfalow
 

-----Original Message-----
From: Steve Lianoglou [mailto:lists@arachnedesign.net] 
Sent: Friday, March 25, 2005 11:43 AM
To: Tomcat Users List
Subject: Re: Tomcat rookie needs help updating project

> However when I make a change to my project either by recompiling some 
> of my Java source code or by modifying some of JSP and/or HTML files, 
> how do I get Tomcat to "recognize" these changes ? If I run the 
> command "ant reload" from the DOS command line, when I rerun my 
> application I do not see my changes. What do I need to do to install 
> project changes ?

If you set reloadable="true" in your web-app context (see my previous 
post), tomcat should also recognize any changes to the WEB-INF folder 
and reload the webapp context automatically w/o taking down the whole 
server.

Or, if you don't set reloadable="true" .. just click "reload" for the 
webapp in the tomcat manager app.

hope that helps,

-steve


---------------------------------------------------------------------
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


Re: Tomcat rookie needs help updating project

Posted by Steve Lianoglou <li...@arachnedesign.net>.
> However when I make a change to my project either by recompiling some 
> of my Java source code or by modifying some of JSP and/or HTML files, 
> how do I get Tomcat to "recognize" these changes ? If I run the 
> command "ant reload" from the DOS command line, when I rerun my 
> application I do not see my changes. What do I need to do to install 
> project changes ?

If you set reloadable="true" in your web-app context (see my previous 
post), tomcat should also recognize any changes to the WEB-INF folder 
and reload the webapp context automatically w/o taking down the whole 
server.

Or, if you don't set reloadable="true" .. just click "reload" for the 
webapp in the tomcat manager app.

hope that helps,

-steve


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