Re: Best practice to deply a web app

2009-07-10 Thread Leon Rosenberg
Also I'm not sure whether you may want to do it, but configureme
(https://configureme.dev.java.net) allows you to configure 200
instances of your app in one war file). You specify configurations for
specific environments (and, most notably, configuraiton deltas), and
set the environment in the installation itself (with one property in
catalina.sh).

Actually, configureme was built to support configuration delta for
multiple systems (live,test,integration,dev) of one application in one
company but it will do your job also. If the application administrator
on customers site wants to manage the config files himself, you can
put the config files in a directory outside of tomcat installation and
simply add this directory to the classpath. This way you can update
the app without modifying the settings.

regards
Leon

P.S. feel free to contact me off list, if you want to try it out and
need help with it.

On Fri, Jul 10, 2009 at 12:25 AM, carlson weber filhocwe...@cdm.com.br wrote:
 But in my case, the client would like to update its software and I have
 about 200 clients with different databases on different locations. If I
 understood well your solution, I would generate 200 hundred wars , one for
 each client?
 PS: I don't deploy the application on internet, only on my customer's
 intranet

 Will Glass-Husain escreveu:

 I generate site-specific war files.  I used to do this with an ant
 script but now I use Maven.  With ant you can specify system variables
 with the -D option (I do -Ddeploy=sitename) and with Maven you can
 choose profiles with the -P option.  I keep setting files for each
 server in source control and my build script downloads those and
 copies them into the war.

 WILL

 On Thu, Jul 9, 2009 at 3:11 PM, carlson weber filhocwe...@cdm.com.br
 wrote:


 I always had a question that no one had answered me in a satisfactory
 manner. We are a comapny that develop desktop applications, using Delphi,
 and now we are migrating some products to Tomcat, using Wicket. When I
 want
 to update our software on a client, we replace the executable and run
 some
 scripts on the database automatically, all the settings like report
 templates, connection settings, stays the same on the software folder.
 How
 would I do this on a Java-ish way? When I generate the .WAR file and put
 it
 on the tomcat webapps folder, it will overwrite all my app files,
 including
 settings and etc. What is the best way to do this?

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org




 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org





 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Best practice to deply a web app

2009-07-10 Thread carlson weber filho

Great David!
   That's exactly what I was looking for, excelent solution, thanks a lot!


David Smith escreveu:

Will Glass-Husain wrote:
  

I generate site-specific war files.  I used to do this with an ant
script but now I use Maven.  With ant you can specify system variables
with the -D option (I do -Ddeploy=sitename) and with Maven you can
choose profiles with the -P option.  I keep setting files for each
server in source control and my build script downloads those and
copies them into the war.

WILL

On Thu, Jul 9, 2009 at 3:11 PM, carlson weber filhocwe...@cdm.com.br wrote:
  


I always had a question that no one had answered me in a satisfactory
manner. We are a comapny that develop desktop applications, using Delphi,
and now we are migrating some products to Tomcat, using Wicket. When I want
to update our software on a client, we replace the executable and run some
scripts on the database automatically, all the settings like report
templates, connection settings, stays the same on the software folder. How
would I do this on a Java-ish way? When I generate the .WAR file and put it
on the tomcat webapps folder, it will overwrite all my app files, including
settings and etc. What is the best way to do this?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



  

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

  


I would put them in the deployment descriptor and store that in the
proper engine and host folder of the conf directory.  You should be able
to replace the webapp without affecting it.  Then on start, your
webapp's ServletContextListener can read the information in and do
something appropriate.

See the context parameters and environment entries section of
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

I didn't see a tomcat version in your post, so please look at the
equivalent of the above URL for whatever tomcat version(s) you are
supporting.

--David




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


  



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Best practice to deply a web app

2009-07-09 Thread Will Glass-Husain
I generate site-specific war files.  I used to do this with an ant
script but now I use Maven.  With ant you can specify system variables
with the -D option (I do -Ddeploy=sitename) and with Maven you can
choose profiles with the -P option.  I keep setting files for each
server in source control and my build script downloads those and
copies them into the war.

WILL

On Thu, Jul 9, 2009 at 3:11 PM, carlson weber filhocwe...@cdm.com.br wrote:
 I always had a question that no one had answered me in a satisfactory
 manner. We are a comapny that develop desktop applications, using Delphi,
 and now we are migrating some products to Tomcat, using Wicket. When I want
 to update our software on a client, we replace the executable and run some
 scripts on the database automatically, all the settings like report
 templates, connection settings, stays the same on the software folder. How
 would I do this on a Java-ish way? When I generate the .WAR file and put it
 on the tomcat webapps folder, it will overwrite all my app files, including
 settings and etc. What is the best way to do this?

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Best practice to deply a web app

2009-07-09 Thread carlson weber filho
But in my case, the client would like to update its software and I have 
about 200 clients with different databases on different locations. If I 
understood well your solution, I would generate 200 hundred wars , one 
for each client?
PS: I don't deploy the application on internet, only on my customer's 
intranet


Will Glass-Husain escreveu:

I generate site-specific war files.  I used to do this with an ant
script but now I use Maven.  With ant you can specify system variables
with the -D option (I do -Ddeploy=sitename) and with Maven you can
choose profiles with the -P option.  I keep setting files for each
server in source control and my build script downloads those and
copies them into the war.

WILL

On Thu, Jul 9, 2009 at 3:11 PM, carlson weber filhocwe...@cdm.com.br wrote:
  

I always had a question that no one had answered me in a satisfactory
manner. We are a comapny that develop desktop applications, using Delphi,
and now we are migrating some products to Tomcat, using Wicket. When I want
to update our software on a client, we replace the executable and run some
scripts on the database automatically, all the settings like report
templates, connection settings, stays the same on the software folder. How
would I do this on a Java-ish way? When I generate the .WAR file and put it
on the tomcat webapps folder, it will overwrite all my app files, including
settings and etc. What is the best way to do this?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


  



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Best practice to deply a web app

2009-07-09 Thread David Smith
Will Glass-Husain wrote:
 I generate site-specific war files.  I used to do this with an ant
 script but now I use Maven.  With ant you can specify system variables
 with the -D option (I do -Ddeploy=sitename) and with Maven you can
 choose profiles with the -P option.  I keep setting files for each
 server in source control and my build script downloads those and
 copies them into the war.

 WILL

 On Thu, Jul 9, 2009 at 3:11 PM, carlson weber filhocwe...@cdm.com.br wrote:
   
 I always had a question that no one had answered me in a satisfactory
 manner. We are a comapny that develop desktop applications, using Delphi,
 and now we are migrating some products to Tomcat, using Wicket. When I want
 to update our software on a client, we replace the executable and run some
 scripts on the database automatically, all the settings like report
 templates, connection settings, stays the same on the software folder. How
 would I do this on a Java-ish way? When I generate the .WAR file and put it
 on the tomcat webapps folder, it will overwrite all my app files, including
 settings and etc. What is the best way to do this?

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org


 

 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org

   
I would put them in the deployment descriptor and store that in the
proper engine and host folder of the conf directory.  You should be able
to replace the webapp without affecting it.  Then on start, your
webapp's ServletContextListener can read the information in and do
something appropriate.

See the context parameters and environment entries section of
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html

I didn't see a tomcat version in your post, so please look at the
equivalent of the above URL for whatever tomcat version(s) you are
supporting.

--David




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org