RE: Re-deploying a war file - RESOLVED

2010-02-12 Thread Joe Wallace
> -Original Message-
 
> After reading  the Tomcat 6.0 User Guide, Section 4, Deployer 
> -Deploying on a running war Tomcat I expected to be able to 
> just drop the updated war file into the web apps folder, 
> overwriting the old war file of the same name and it would 
> automatically replace the previously exploded war with the 
> new.  The document says,
> 'If the Host autoDeploy attribute is "true", the Host will 
> attempt to deploy and update web applications dynamically, as 
> needed, for example if a new .WAR is dropped into the 
> appBase. For this to work, the Host needs to have background 
> processing enabled which is the default configuration'. 

> I could not get this to happen.  The new war would not 
> re-deploy while Tomcat was running and would not re-deploy 
> after restarting Tomcat.

I needed to set the Host attribute autoDeploy="true" in the server.xml

Setting the Context attribute reloadable="true" also works 
but is Not recommended for use on deployed production applications

 
 
 


> Tomcat Configuration Reference, Context 
> section link to Automatic Application 
> Deployment where I read the following,
> 'If you redeploy an updated WAR file, be sure to delete the 
> expanded directory when restarting Tomcat, so that the 
> updated WAR file will be re-expanded (note that the auto 
> deployer, if enabled, will automatically expand the updated 
> WAR file once the previously expanded directory is removed).'

This also works 

Joe

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



RE: Re-deploying a war file

2010-02-11 Thread Joe Wallace
From
\conf\Catalina\localhost   appName.xml





From
\conf   server.xml


  







   

 







 


  
  

  
  

  
  



  
  







  

  


-Original Message-
From: Pid [mailto:p...@pidster.com]
Sent: Thursday, February 11, 2010 5:17 PM
To: Tomcat Users List
Subject: Re: Re-deploying a war file


On 10/02/2010 16:31, Joe Wallace wrote:
> I have been working with Tomcat 6.0.20 running as a windows service for about 
> a year.
 > I update the application war file every few months.

OK.

> After reading  the Tomcat 6.0 User Guide, Section 4, Deployer -Deploying on a 
> running war
 >Tomcat I expected to be able to just drop the updated war file into 
the web apps folder,
> overwriting the old war file of the same name and it would automatically 
> replace the
> previously exploded war with the new.

Yep.

> The document says, 'If the Host autoDeploy attribute is "true", the Host will 
> attempt
> to deploy and update web applications dynamically, as needed, for example if 
> a new .WAR
> is dropped into the appBase. For this to work, the Host needs to have 
> background
> processing enabled which is the default configuration'. I could not get this 
> to happen.

Please post your server.xml.  N.B. removing any passwords & editing out 
the comments is a good idea.

> The new war would not re-deploy while Tomcat was running and would not 
> re-deploy after
> restarting Tomcat. I then read the Tomcat Configuration Reference, Context 
> section and
> followed the link to Automatic Application Deployment where I read the 
> following,
> 'If you redeploy an updated WAR file, be sure to delete the expanded 
> directory when
> restarting Tomcat, so that the updated WAR file will be re-expanded (note 
> that the
> auto deployer, if enabled, will automatically expand the updated WAR file 
> once the
> previously expanded directory is removed).'
> I tried this and it does exactly what I wanted, so that is what I have been 
> doing.
> Can someone enlighten me on my confusion between the two sets of instructions.

This works for me, just by replacing the WAR file with a new one - maybe 
there's something in your config, or the web app is holding onto JARs & 
stopping the app from being replaced.


p

-
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-deploying a war file

2010-02-10 Thread Joe Wallace
I have been working with Tomcat 6.0.20 running as a windows service for about a 
year.  I update the application war file every few months.  
After reading  the Tomcat 6.0 User Guide, Section 4, Deployer -Deploying on a 
running war Tomcat I expected to be able to just drop the updated war file into 
the web apps folder, overwriting the old war file of the same name and it would 
automatically replace the previously exploded war with the new.  The document 
says,
'If the Host autoDeploy attribute is "true", the Host will attempt to deploy 
and update web applications dynamically, as needed, for example if a new .WAR 
is dropped into the appBase. For this to work, the Host needs to have 
background processing enabled which is the default configuration'. 
I could not get this to happen.  The new war would not re-deploy while Tomcat 
was running and would not re-deploy after restarting Tomcat.
I then read the Tomcat Configuration Reference, Context section and followed 
the link to Automatic Application Deployment where I read the following,
'If you redeploy an updated WAR file, be sure to delete the expanded directory 
when restarting Tomcat, so that the updated WAR file will be re-expanded (note 
that the auto deployer, if enabled, will automatically expand the updated WAR 
file once the previously expanded directory is removed).'
I tried this and it does exactly what I wanted, so that is what I have been 
doing.
Can someone enlighten me on my confusion between the two sets of instructions.

Joe

 
 






RE: SessionID cookie not secure over SSL

2009-10-28 Thread Joe Wallace
OK. Thanks to all.
Joe

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Wednesday, October 28, 2009 12:40 PM
To: Tomcat Users List
Cc: p...@pidster.com
Subject: Re: SessionID cookie not secure over SSL


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Joe,

On 10/28/2009 11:55 AM, Joe Wallace wrote:
> From Firefox Live HTTP Headers
> 
> Set-Cookie: JSESSIONID=B4F06784FE4EAA0A7C9830BBF86D85B4; Path=/inetwork; 
> Secure
> Location: https://216.94.100.154/inetwork/Start.jsp
> 
> H.  That looks like it is secure

Yup.

> My filter is getting this.
> 
>  Cookie0 name= JSESSIONID
>  Cookie0 value= B4F06784FE4EAA0A7C9830BBF86D85B4
>  Cookie0 isSecure = false

Aah, I see the problem: the cookie /is/ secure, but the browser doesn't
provide the "secure" flag when making a request, so the server has no
idea whether the cookie is in secure mode or not.

Rest assured that the browser will only send this cookie when using HTTPS.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkroc8YACgkQ9CaO5/Lv0PBDwwCff52b5PurVJoC36Tikz+0THoa
y/sAmQHuRxFS3CWFPTFiNxjwYrejYq0E
=UOKF
-END PGP SIGNATURE-

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



RE: SessionID cookie not secure over SSL

2009-10-28 Thread Joe Wallace
From Firefox Live HTTP Headers

Set-Cookie: JSESSIONID=B4F06784FE4EAA0A7C9830BBF86D85B4; Path=/inetwork; Secure
Location: https://216.94.100.154/inetwork/Start.jsp

H.  That looks like it is secure

My filter is getting this.

 Cookie0 name= JSESSIONID
 Cookie0 value= B4F06784FE4EAA0A7C9830BBF86D85B4
 Cookie0 isSecure = false

Filter code
HttpServletRequest httpReq = (HttpServletRequest)req;
HttpServletResponse httpResp = (HttpServletResponse)res;
System.out.println ("http request is secure = " + httpReq.isSecure());
Cookie[] c ;
c = httpReq.getCookies();
if(c != null)
{
for (int i = 0; i < c.length; i++) 
{
System.out.println(" Cookie" + i + " name= " + 
c[i].getName());
System.out.println(" Cookie" + i + " value= " + 
c[i].getValue());
System.out.println(" Cookie" + i + " isSecure=" + 
c[i].getSecure());
}
}

JW


-Original Message-
From: Pid [mailto:p...@pidster.com]
Sent: Wednesday, October 28, 2009 9:52 AM
To: Tomcat Users List
Subject: Re: SessionID cookie not secure over SSL


On 27/10/2009 22:31, Joe Wallace wrote:
>
> André Warnier wrote:
>> Am I mistaken then to think that since the connection B from IIS to
>> Tomcat is not over HTTPS but over AJP, Tomcat has no idea that HTTPS is
>> being used ?
>> Whatever consequences this has in the context (and which are beyond my
>> expertise).
>
> Andre,
> I guess that is the question.
>
> The filter I have in Tomcat calls request.isSecure().
> This returns true.
>
> (All requests have been using https)

What steps are you taking to ensure this is the case?

How are you enforcing HTTPS, are you using a 
CONFIDENTIAL?

Under the general category of asking the obvious, can you clear all 
existing cookies and then use Firebug/LiveHTTPHeaders in Firefox (or the 
browser of your choice) to see exactly when the first Set-Cookie header 
occurs?


p




> If when tomcat does this.
>
> if(request.isSecure())
>cookie.setSecure(true);
>
> A call to cookie.getSecure should return true.
>
> But the same filter that returns true for request.isSecure()
> calls Cookie.getSecure() and it returns false.
>
>
>
> Joe
>
>
>
>
>
>
>
> -----Original Message-
> From: André Warnier [mailto:a...@ice-sa.com]
> Sent: Tuesday, October 27, 2009 5:11 PM
> To: Tomcat Users List
> Subject: Re: SessionID cookie not secure over SSL
>
>
> Joe Wallace wrote:
>>
>> -Original Message-
>> From: André Warnier [mailto:a...@ice-sa.com]
>> Sent: Tuesday, October 27, 2009 4:48 PM
>> To: Tomcat Users List
>> Subject: Re: SessionID cookie not secure over SSL
>>
>>
>>> Joe Wallace wrote:
>>>> I am using session cookies to track sessions.  I am used to Jrun where you 
>>>> would specifically set the cookie to be sent only over SSL or https.  This 
>>>> was not the>default setting.  I want users to connect to my web site using 
>>>> https then they might click a link on one of my web pages whose protocal 
>>>> is not secure.  What is the>behavior of the JSESSIONID cookie in this 
>>>> situation.
>>>>
>>> Joe,
>>
>>> 1) assuming your setup is
>>
>>> browsers<-->  IIS<-->  Tomcat
>>  A B
>>
>>> which portion(s) is(/are) using HTTPS ? A ? B ? both ?
>>
>>> 2) "secure" is an attribute of a cookie, written inside of the cookie by
>>> the server creating the cookie in the first place.
>>> If set, it has as consequence that a browser will only send it back to
>>> the original server with subsequent requests, if these subsequent
>>> requests happen over a HTTPS connection.
>>
>>> In other words, if you set the secure attribute on the JSESSIONID
>>> cookie, because for instance your initial request happens over HTTPS,
>>> then you switch to a non-HTTPS part of the site, the browser is probably
>>> no longer going to send this cookie back to the server.
>>> In other words, you will, for practical purposes, "lose your session".
>>
>>> Not so, gurus ?
>>
>> Portion A is using IIS.  IIS holds the SSL cert.
>> I am using AJP 1.3 connector for IIS
>> It is defined in the Tomcat Server.xml
>>
>> 
>>  > />
>>
>
>> Am I mistaken then to think that since the connection B from IIS to
>> Tomcat is not over HTTPS but over AJP, Tomcat has no idea that HTTPS is
>> being used ?
>> Whatever consequences this has in the context (and which are beyond my
>> expertise).
>
>
>
>
>
>
> -
> 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: SessionID cookie not secure over SSL

2009-10-27 Thread Joe Wallace

André Warnier wrote:
>Am I mistaken then to think that since the connection B from IIS to 
>Tomcat is not over HTTPS but over AJP, Tomcat has no idea that HTTPS is 
>being used ?
>Whatever consequences this has in the context (and which are beyond my 
>expertise).

Andre,
I guess that is the question.

The filter I have in Tomcat calls request.isSecure().
This returns true.

(All requests have been using https)

If when tomcat does this.

if(request.isSecure())
  cookie.setSecure(true); 

A call to cookie.getSecure should return true.

But the same filter that returns true for request.isSecure()
calls Cookie.getSecure() and it returns false. 



Joe







-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Sent: Tuesday, October 27, 2009 5:11 PM
To: Tomcat Users List
Subject: Re: SessionID cookie not secure over SSL


Joe Wallace wrote:
> 
> -Original Message-
> From: André Warnier [mailto:a...@ice-sa.com]
> Sent: Tuesday, October 27, 2009 4:48 PM
> To: Tomcat Users List
> Subject: Re: SessionID cookie not secure over SSL
> 
> 
>> Joe Wallace wrote:
>>> I am using session cookies to track sessions.  I am used to Jrun where you 
>>> would specifically set the cookie to be sent only over SSL or https.  This 
>>> was not the >default setting.  I want users to connect to my web site using 
>>> https then they might click a link on one of my web pages whose protocal is 
>>> not secure.  What is the >behavior of the JSESSIONID cookie in this 
>>> situation.
>>>
>> Joe,
> 
>> 1) assuming your setup is
> 
>> browsers <--> IIS  <--> Tomcat
> A B
> 
>> which portion(s) is(/are) using HTTPS ? A ? B ? both ?
> 
>> 2) "secure" is an attribute of a cookie, written inside of the cookie by 
>> the server creating the cookie in the first place.
>> If set, it has as consequence that a browser will only send it back to 
>> the original server with subsequent requests, if these subsequent 
>> requests happen over a HTTPS connection.
> 
>> In other words, if you set the secure attribute on the JSESSIONID 
>> cookie, because for instance your initial request happens over HTTPS, 
>> then you switch to a non-HTTPS part of the site, the browser is probably 
>> no longer going to send this cookie back to the server.
>> In other words, you will, for practical purposes, "lose your session".
> 
>> Not so, gurus ?
> 
> Portion A is using IIS.  IIS holds the SSL cert.
> I am using AJP 1.3 connector for IIS
> It is defined in the Tomcat Server.xml
> 
> 
>  />
> 

>Am I mistaken then to think that since the connection B from IIS to 
>Tomcat is not over HTTPS but over AJP, Tomcat has no idea that HTTPS is 
>being used ?
>Whatever consequences this has in the context (and which are beyond my 
>expertise).






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



RE: SessionID cookie not secure over SSL

2009-10-27 Thread Joe Wallace


-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Sent: Tuesday, October 27, 2009 4:48 PM
To: Tomcat Users List
Subject: Re: SessionID cookie not secure over SSL


>Joe Wallace wrote:
>> I am using session cookies to track sessions.  I am used to Jrun where you 
>> would specifically set the cookie to be sent only over SSL or https.  This 
>> was not the >default setting.  I want users to connect to my web site using 
>> https then they might click a link on one of my web pages whose protocal is 
>> not secure.  What is the >behavior of the JSESSIONID cookie in this 
>> situation.
>> 
>Joe,

>1) assuming your setup is

>browsers <--> IIS  <--> Tomcat
A B

>which portion(s) is(/are) using HTTPS ? A ? B ? both ?

>2) "secure" is an attribute of a cookie, written inside of the cookie by 
>the server creating the cookie in the first place.
>If set, it has as consequence that a browser will only send it back to 
>the original server with subsequent requests, if these subsequent 
>requests happen over a HTTPS connection.

>In other words, if you set the secure attribute on the JSESSIONID 
>cookie, because for instance your initial request happens over HTTPS, 
>then you switch to a non-HTTPS part of the site, the browser is probably 
>no longer going to send this cookie back to the server.
>In other words, you will, for practical purposes, "lose your session".

>Not so, gurus ?

Portion A is using IIS.  IIS holds the SSL cert.
I am using AJP 1.3 connector for IIS
It is defined in the Tomcat Server.xml




Joe






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



RE: SessionID cookie not secure over SSL

2009-10-27 Thread Joe Wallace
Hi Chris,
You wrote:
>Tomcat will create its JSESSIONID cookie like this in all cases:

>Cookie cookie = new Cookie("JSESSIONID", sessionId);
>if(request.isSecure())
>  cookie.setSecure(true);

My filter calls HttpServletRequest.isSecure() which returns true
It then calls Cookie.getSecure() for the JSESSIONID cookie which returns false. 

I am expecting this to return true since all connections have been over https.
Or should I be looking elswhere?


JW

 

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Tuesday, October 27, 2009 4:07 PM
To: Tomcat Users List
Subject: Re: SessionID cookie not secure over SSL


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Joe,

On 10/27/2009 5:00 PM, Joe Wallace wrote:
> I am using session cookies to track sessions.  I am used to Jrun
> where you would specifically set the cookie to be sent only over SSL
> or https.  This was not the default setting.  I want users to connect
> to my web site using https then they might click a link on one of my
> web pages whose protocal is not secure.  What is the behavior of the
> JSESSIONID cookie in this situation.

Tomcat will create its JSESSIONID cookie like this in all cases:

Cookie cookie = new Cookie("JSESSIONID", sessionId);
if(request.isSecure())
  cookie.setSecure(true);

(Note that the code might not look exactly like this, but it behaves in
this way).

So, if your session was created during a non-secure request, you'll get
a non-secure cookie. The solution? Make all your requests HTTPS. If you
have non-secure pages, you'll need to make sure they don't call
request.getSession(true) either explicitly or implicitly (say, by
forgetting to set session="false" for a JSP).

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrnUvIACgkQ9CaO5/Lv0PCVjACfdqIQS8CFhelJtjgOWaoHtBhc
6gAAoIrWzROh0PTIOUYe4Aobnm3YWVtp
=mlkD
-END PGP SIGNATURE-

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



RE: SessionID cookie not secure over SSL

2009-10-27 Thread Joe Wallace
I am using session cookies to track sessions.  I am used to Jrun where you 
would specifically set the cookie to be sent only over SSL or https.  This was 
not the default setting.  I want users to connect to my web site using https 
then they might click a link on one of my web pages whose protocal is not 
secure.  What is the behavior of the JSESSIONID cookie in this situation.

JW



-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Tuesday, October 27, 2009 3:42 PM
To: Tomcat Users List
Subject: Re: SessionID cookie not secure over SSL


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Joe,

(Can you fix your emailer to include thread-ids when replying to the
list? Your replies are not properly threaded, here.)

On 10/27/2009 4:12 PM, Joe Wallace wrote:
> I have a filter that calls
> Cookie.getName and 
> Cookie.getSecure
> JSESSIONID returns false even when the connection is always https.
> Tomcat version is 6.0.20.  

If your cookie was created in HTTP mode, then the 'secure' flag will be
set to 'false' on that cookie. Are you sure you are always in HTTP mode?
Please double-check, and remember that /all JSPs will create a session
unless session=false in the @page directive/.

To answer your original question: there is no setting in Tomcat to get
secure=true on your cookies in SSL mode. Tomcat should /always/ use a
secure cookie when the cookie is created in SSL mode.

You may have to re-check your  attributes for the AJP
connector. Make sure that secure="true" among others.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrnTQ8ACgkQ9CaO5/Lv0PA/GQCgnPYgzFkWNPP0Ol57BxVg4uX5
YQsAnjGCZMrB4svfzI/S/TL9mhNtjfiv
=GZXQ
-END PGP SIGNATURE-

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



RE: SessionID cookie not secure over SSL

2009-10-27 Thread Joe Wallace
I have a filter that calls
Cookie.getName and 
Cookie.getSecure
JSESSIONID returns false even when the connection is always https.
Tomcat version is 6.0.20.  

JW


-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Tuesday, October 27, 2009 3:04 PM
To: Tomcat Users List
Subject: RE: SessionID cookie not secure over SSL


> From: Joe Wallace [mailto:j...@andar360.com]
> Subject: SessionID cookie not secure over SSL
> 
> Is there a setting in Tomcat 6.0.2

Are you really using a version of Tomcat that old (Nov 2006)?

> to make the SessionID cookie secure
> when created over https when using
> AJP 1.3 connector for IIS?

What makes you think the cookie isn't being encrypted along with everything 
else sent over HTTPS?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


-
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



SessionID cookie not secure over SSL

2009-10-27 Thread Joe Wallace
Is there a setting in Tomcat 6.0.2 to make the SessionID cookie secure when 
created over https when using 
AJP 1.3 connector for IIS?  
 
JW



RE: Run multiple web applications in Tomcat each as an independent windows service question

2009-03-10 Thread Joe Wallace
We will have to rethink our reasons for wanting multiple windows services 
other than we have it that way with Jrun now.  It may be more of a 
mindset problem.
My initial problems in Tomcat were file locking (when starting
and stopping each web app with the Tomcat Manager) and then 
thinking there may be issues in sharing a single jvm.

The information from this mailing list has been very helpful. 

Joe 



-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: Tuesday, March 10, 2009 11:29 AM
To: Tomcat Users List
Subject: Re: Run multiple web applications in Tomcat each as an
independent windows service question


-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Gregor,

On 3/10/2009 11:17 AM, Gregor Schneider wrote:
> On Tue, Mar 10, 2009 at 3:35 PM, Christopher Schultz
>  wrote:
>>  because it makes your deployment easier.
>>
> Hm, I guess I'll have to disagree here:

No, we're in agreement: one TC is easier than many.

I just didn't read his sentence properly. Nobody bothered to answer his
question in the first place, so I went ahead and did so.

My post was not very well laid-out. I had intended to say something like
"your deployment will be easier with a single Tomcat but, if you insist,
you can do the following to get multiple TC instances as services...".

Hope that clears things up.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkm2h1cACgkQ9CaO5/Lv0PClOQCguIJP/EvCfZjmIeOZs6r0OGGS
utkAnA8J3TOP2xHV7cclw3hmb2d54k73
=5Oqg
-END PGP SIGNATURE-

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



RE: Run multiple web applications in Tomcat each as an independent windows service question

2009-03-09 Thread Joe Wallace
You hit the nail on the head.
Performance being equal I see no reason to use separate jvm/tomcat instances.
Thanks,
Joe Wallace


-Original Message-
From: André Warnier [mailto:a...@ice-sa.com]
Sent: Monday, March 09, 2009 12:47 PM
To: Tomcat Users List
Subject: Re: Run multiple web applications in Tomcat each as an
independent windows service question


Joe Wallace wrote:
> The setup is like this.
> 
> http://host1/app0:8080
> http://host1/app1:8081
> http://host1/app2:8082
> 
> App0,1,2 all being the same web app deployed with a different name, and with 
> different url.
> The concept being each web app serves a specific set of users with each set 
> of users having their own separate database.  
> Same web app different data.
> 
> Joe Wallace
> 
Hi.
Let's summarise and restart from the beginning, building on what Chick 
and Gregor already wrote.
You are under Windows, and you want to run Tomcat as a Windows Service.
You have 3 webapps with independent sets of data and users.  Whether 
they are the same webapp (renamed) or not makes no difference.

You /can/ run 3 instances of Tomcat (in fact, 3 instances of a JVM 
running Tomcat), each one listening on a separate port, but from the 
above description this is not necessary.
You could run a single instance of Tomcat, with all 3 webapps, provided 
they have different names.  Each webapp will have its own set of static 
variables, as Chuck explained.
Using a single instance of Tomcat, listening on a single port (say 8080) 
would be easier :
- the users of your 3 webapps would access them by the URLs
   http://host1:8080/app1
   http://host1:8080/app2
   http://host1:8080/app3
and your layout would be
(CATALINA_HOME)/webapps/app1/*
(CATALINA_HOME)/webapps/app2/*
(CATALINA_HOME)/webapps/app3/*
(where CATALINA_HOME is the top directory where you installed your 
Windows Tomcat) and you would have a single Tomcat Service.

The (possible) inconvenient I can see is that if one webapp crashes the 
server, it will crash the whole Tomcat with the 3 webapps.  But that 
does not happen very often.
You can start/stop/reload/redeploy each webapp independently using, for 
instance, the Tomcat Manager application.

Now if you absolutely want 3 separate ports, and/or 3 separate 
JVM/Tomcat instances, and/or running 3 independent Windows Services, any 
or all of that is also possible, but the setup is more complicated.
So, do you have a compelling reason to do that ?


-
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: Run multiple web applications in Tomcat each as an independent windows service question

2009-03-09 Thread Joe Wallace
The setup is like this.

http://host1/app0:8080
http://host1/app1:8081
http://host1/app2:8082

App0,1,2 all being the same web app deployed with a different name, and with 
different url.
The concept being each web app serves a specific set of users with each set of 
users having their own separate database.  
Same web app different data.

Joe Wallace

-Original Message-
From: Gregor Schneider [mailto:rc4...@googlemail.com]
Sent: Saturday, March 07, 2009 9:18 AM
To: Tomcat Users List
Subject: Re: Run multiple web applications in Tomcat each as an
independent windows service question


sound slike a very crude design to me, however...

On Fri, Mar 6, 2009 at 9:36 PM, Joe Wallace  wrote:
> I essentially will be running the same web app installed multiple times.  
> Each web app will connect to its own unique
> database.  Since I don't want them sharing static variables in the jvm I need 
> to keep them completely separate.  This
> is a well developed application being ported from Jrun where this was 
> possible.

do I understand it correctly that the urls of your apps then are

http://host1/crudeapp
http://host2/crudeapp
http://host3/crudeapp

or ist it

http://host1/crudeapp:8080
http://host1/crudeapp:8081
http://host1/crudeapp:8082

???

Still, I do not see any way how you could have loaded http://pgpkeys.pca.dfn.de:11371

-
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: Run multiple web applications in Tomcat each as an independent windows service question

2009-03-06 Thread Joe Wallace
I essentially will be running the same web app installed multiple times.  Each 
web app will connect to its own unique database.  Since I don't want them 
sharing static variables in the jvm I need to keep them completely separate.  
This is a well developed application being ported from Jrun where this was 
possible.  To do this in Tomcat do I have no choice but to install multiple 
instances of Tomcat or is there another way?  In other words I need 5 web apps 
on my web server each running in its own jvm.

Joe

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Tuesday, March 03, 2009 4:14 PM
To: Tomcat Users List
Subject: RE: Run multiple web applications in Tomcat each as an
independent windows service question


> From: Joe Wallace [mailto:j...@andar360.com]
> Subject: Re: Run multiple web applications in Tomcat each as
> an independent windows service question

> I have two applications in Tomcat and I want to run
> each as its own windows service.

Then you would have to run each webapp in its own instance of Tomcat.  A 
Windows service is just a program, and for this purpose that program is Tomcat, 
regardless of the number of webapps deployed.

> I want to be able to stop App1 without stopping App 2.

As Gregor pointed out, use Tomcat's built-in manager app, or run two separate 
Tomcats.

> I have been doing this with Jrun with multiple web apps
> each running as an independent windows service

Then you were actually running multiple copies of JRun.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
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: Run multiple web applications in Tomcat each as an independent windows service question

2009-03-03 Thread Joe Wallace
Thanks, I tried this and so far it looks like it does what I need it to do.  
Tomcat runs as a windows service and I can manipulate multiple web apps with 
the Tomcat Manager without the file locking problem.  It is interesting that 
Tomcat created a temp folder and deployed the webapp there, which is similiar 
to what JRun does.  
Thanks again.
Joe

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com]
Sent: Tuesday, March 03, 2009 4:24 PM
To: Tomcat Users List
Subject: RE: Run multiple web applications in Tomcat each as an
independent windows service question


> From: Joe Wallace [mailto:j...@andar360.com]
> Subject: RE: Run multiple web applications in Tomcat each as
> an independent windows service question
>
> It says the web app is stopped but windows still holds on to
> the files.

Isn't Windows wonderful?  (That's a rhetorical question.)  You need to set the 
antiJARLocking and antiResourceLocking attributes in the  elements for 
your webapps; look here for the doc:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Standard%20Implementation

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
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: Run multiple web applications in Tomcat each as an independent windows service question

2009-03-03 Thread Joe Wallace
Thanks for the suggestion.  I tried Tomcat's Manager-App with the 
apache-tomcat-6.0.18.exe running as a windows service.  It says the web app is 
stopped but windows still holds on to the files.  I tried stopping App1 with 
App2 still running and replacing a file in App1 but windows wouldn't let me.  I 
had to stop the Tomcat windows service first which then stopped both apps.  I 
had hoped to be able to start/stop web apps running as a windows service.  I 
think I could do it with multiple Tomcat instances instead of one Tomcat 
instance with multiple web apps.
Regards,
Joe

-Original Message-
From: Gregor Schneider [mailto:rc4...@googlemail.com]
Sent: Tuesday, March 03, 2009 3:48 PM
To: Tomcat Users List
Subject: Re: Run multiple web applications in Tomcat each as an
independent windows service question


I suggest you have a look at Tomcat's Manager-App. It doesn'tuse
Windows-services but offers the possibility to start / stop a web-app,
and I guess that's what you want:

http://tomcat.apache.org/tomcat-6.0-doc/manager-howto.html

rgds

Gregor
-- 
just because your paranoid, doesn't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

-
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



Run multiple web applications in Tomcat each as an independent windows service question

2009-03-03 Thread Joe Wallace
I have two applications in Tomcat and I want to run each as its own windows 
service.
I have installed apache-tomcat-6.0.18.exe and it runs as a windows service.  
Stopping and starting the Tomcat windows service will also stop and start both 
App1 and App2.  I want to be able to stop App1 without stopping App 2.  I have 
been doing this with Jrun with multiple web apps each running as an independent 
windows service but I have not been able to find a way to do this in Tomcat and 
have not been able to find any information about anyone doing this.  Is this 
even possible?
 
 
Regards,

Joe Wallace