Parallel deployment and session replication

2011-08-12 Thread Aristedes Maniatis

I am an enthusiastic user of the new parallel deployment feature of tomcat 7. 
But I'm a little unclear about how it interacts with session replication.

If I have a cluster of tomcat instances:

instance1/A#001.war
instance2/A#001.war
instance3/A#001.war

And they are all replicating sessions (say using SimpleTcpCluster). Then I want 
to upgrade, so I introduce more war files:

instance1/A#001.war
instance1/A#002.war
instance2/A#001.war
instance2/A#002.war
instance3/A#001.war
instance3/A#002.war

Now, since these are effectively the same applications, they are all on the 
same multicast address and port. So I assume that sessions will now replicate 
between all 6 instances.

* Will the old instances ever shut down? That is, will the sessions ever die on 
the old instances if they are part of the session replication cluster?

* Is parallel deployment only designed to work with sticky sessions?


Thanks
Ari


--
-->
Aristedes Maniatis
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A

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



RE: auth-constraint

2011-08-12 Thread markt
"Caldarale, Charles R"  wrote:

>> From: Bijesh Vijayan [mailto:bijes

v...@gmail.com] 
>> Subject: Re: auth-constraint
>
>> Is there a way in tomcat 7 to mention the roles outside of web.xml.
>
>Read section 8 of the servlet 3.0 spec; you might be able to use a
>web-fragment.xml to list the roles.
>
> - 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

Check the realm docs for 7.0.20. There is an option documented that controls 
how * is used.

Mark



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



RE: auth-constraint

2011-08-12 Thread Caldarale, Charles R
> From: Bijesh Vijayan [mailto:bije...@gmail.com] 
> Subject: Re: auth-constraint

> Is there a way in tomcat 7 to mention the roles outside of web.xml.

Read section 8 of the servlet 3.0 spec; you might be able to use a 
web-fragment.xml to list the roles.

 - 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



Re: auth-constraint

2011-08-12 Thread Bijesh Vijayan
> Probably a bug in the version of Tomcat 5.?.? that you were using.  See this 
> bugzilla entry:
5.26

Is there a way in tomcat 7 to mention the roles outside of web.xml.

Bijesh.

On Fri, Aug 12, 2011 at 4:14 PM, Caldarale, Charles R
 wrote:
>> From: Bijesh Vijayan [mailto:bije...@gmail.com]
>> Subject: auth-constraint
>
>> I was having the following entry in my application web.xml in tomcat 5.
>
> You need to be precise when stating Tomcat versions; Tomcat 5.what.what?
>
>> 
>>   *
>> 
>
> Let's look at section 12.7 of the servlet spec:
>
> "The special role name "*" is a shorthand for all role names defined in the 
> deployment descriptor."
>
>> I was getting all the roles from the Database.
>
> Probably a bug in the version of Tomcat 5.?.? that you were using.  See this 
> bugzilla entry:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=15570
>
>> When I migrated to tomcat 7, I need to mention all the roles in
>> application web.xml.
>
> As the spec requires.
>
>  - 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: Cannot make war file as default app

2011-08-12 Thread exquisite
Thanks Chris for your reply. 

Yeah im trying the ROOT.war way too and here i have one more issue with that:

Now when i renamed my war to ROOT.war and drop it in webapps folder 
(without any context in server.xml), it deploys fine for the first time 
as the root app (Creates a ROOT folder in webapps),  but if i make any 
change to any of my jsps and drop the new ROOT.war file, it says its deploying 
ROOT.war but it does not 
pick the changes after restart. It keeps showing me the old jsp when i run. I 
tried with autoDeploy=true in Host config but there is no change.

Do i have to manually delete the ROOT folder that tomcat creates, everytime 
before the fresh deployment?

Im
 trying different ways to understand what tomcat really is doing. Please
 explain this as i have been through enough confusion already about 
whats going on. 

Again, this is Tomcat 6.0.32, jdk 1.5, windows 7 OS.

Thanks
G



From: Christopher Schultz 
To: Tomcat Users List 
Sent: Friday, August 12, 2011 11:21 AM
Subject: Re: Cannot make war file as default app

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

G,

On 8/12/2011 4:55 AM, exquisite wrote:
> Hey Mark, I think i figured out what's going on with my
> configuration and I feel that the Tomcat Documentation is not too
> clear explaining this particular step.
> 
> I have been editing the server.xml in the $CATALINA_HOME/conf 
> directory, dropped my war in $CATALINA_HOME/webapps directory but by 
> default tomcat distribution comes with ROOT folder inside webapps 
> directory and there by its not able to deploy my war file as ROOT.

If that's the case, then you have not properly disabled auto-deploy in
your . That's the only way that the webapps/ROOT directory should
interfere.

Seriously, what's wrong with re-naming your WAR file to ROOT.war? It.
Just. Solves. So. Many. Problems.

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

iEYEARECAAYFAk5Fbz0ACgkQ9CaO5/Lv0PAV1QCfXhoknQcGOSUN3jwHmw21b2iI
angAoKUgJPT63bD1XwNrED0DkZcKuyOT
=Vg+1
-END PGP SIGNATURE-

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

Re: Parallel Deployment & Sessions: What am I Missing?

2011-08-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jonathan,

On 8/12/2011 3:02 PM, Jonathan Rosenberg wrote:
> Mystery solved, I think.
> 
> I did a little more digging around & discovered that my cookie had
> two JSESSIONID values. I didn't even know this was possible.

Yep, cookies can have multiple values.

You aren't doing this, but you can get two separate JSESSIONID cookies
if you have one context nested inside the other. The paths are
different, but one of them is a prefix of the other, so the nested
context gets both cookies. You can confuse the hell out of yourself
doing that (we did!) and it's best to avoid those situations.

Tomcat is actually (thankfully!) tolerant of multiple JSESSIONID values:
if there are many JSESSIONID cookies in the request, Tomcat loops
through all of them to see if *any* are valid. The first valid one gets
used (though there is no guarantee of the order in which they are
tested). If none are valid (last time I read the code), it tries to use
the last JSESSIONID requested as the new session id. I think that's
probably not true anymore due to the (semi-) recent changes to session
id management to help mitigate session hijacking and other nasty things.

So, the JSESSIONID you were seeing probably had a path that wasn't the
same as the webapp you are playing with, and that was the one you were
looking at. Tomcat was ignoring it because it wasn't valid but you
really had no way to tell without more invasive testing.

> Neither of the values matched Tomcat's session id & the browser was 
> unable to update the cookie's JSESSIONID properly (no surprise).
> 
> I deleted this rogue cookie & all apears to be working as expected.

Glad you got your problem solved.

> Lots of moving parts ...

Yes.

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

iEYEARECAAYFAk5FkeUACgkQ9CaO5/Lv0PDT8ACbB/xEPsuxUv7paL87K9CUTLh5
Dr4AoIinSVA1oxVL5Hp+FQzelhloByAh
=sGxB
-END PGP SIGNATURE-

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



Re: Cannot make war file as default app

2011-08-12 Thread exquisite
Thanks Chuck for your point. 

Now when i renamed my war to ROOT.war and drop it in webapps folder (without 
any context in server.xml), it deploys fine for the first time as the root app 
(Creates a ROOT folder in webapps),  but if i make any change to any of my jsps 
and drop the new ROOT.war file, it does not pick the changes. 

Do i have to manually delete the ROOT folder that tomcat creates, everytime 
before the fresh deployment?

Im trying different ways to understand what tomcat really is doing. Please 
explain this as i have been through enough confusion already about whats going 
on. 

Again, this is Tomcat 6.0.32, jdk 1.5, windows 7 OS.

Thanks
G




From: "Caldarale, Charles R" 
To: Tomcat Users List 
Sent: Friday, August 12, 2011 7:28 AM
Subject: RE: Cannot make war file as default app

> From: exquisite [mailto:gautam_exquis...@yahoo.com] 
> Subject: Re: Cannot make war file as default app

> i did not want to rename my war to ROOT.war

And thereby make a lot more work for yourself.  Simply rename it and be done.

Using the horribly outdated and restrictive mechanism of placing  
elements in server.xml comes from the dark ages; don't go there.

- 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

RE: auth-constraint

2011-08-12 Thread Caldarale, Charles R
> From: Bijesh Vijayan [mailto:bije...@gmail.com] 
> Subject: auth-constraint

> I was having the following entry in my application web.xml in tomcat 5.

You need to be precise when stating Tomcat versions; Tomcat 5.what.what?

> 
>   *
> 

Let's look at section 12.7 of the servlet spec:

"The special role name "*" is a shorthand for all role names defined in the 
deployment descriptor."

> I was getting all the roles from the Database.

Probably a bug in the version of Tomcat 5.?.? that you were using.  See this 
bugzilla entry:
https://issues.apache.org/bugzilla/show_bug.cgi?id=15570

> When I migrated to tomcat 7, I need to mention all the roles in
> application web.xml.

As the spec requires.

 - 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



auth-constraint

2011-08-12 Thread Bijesh Vijayan
Hi,

I was having the following entry in my application web.xml in tomcat 5.


*


I was getting all the roles from the Database.

When I migrated to tomcat 7, I need to mention all the roles in
application web.xml.


PORTAL_DEV
ADMIN
   

So now I need to maintain the roles in both Database and in web.xml.
Is there a way to mention the roles in web.xml as "*"

Bijesh.

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



Re: Parallel Deployment & Sessions: What am I Missing?

2011-08-12 Thread Jonathan Rosenberg
Mystery solved, I think.

I did a little more digging around & discovered that my cookie had two
JSESSIONID values. I didn't even know this was possible.

Neither of the values matched Tomcat's session id & the browser was
unable to update the cookie's JSESSIONID properly (no surprise).

I deleted this rogue cookie & all apears to be working as expected.

Lots of moving parts ...

--
Jonathan Rosenberg
Founder & Executive Director
Tabby's Place, a Cat Sanctuary
http://www.tabbysplace.org/

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



Re: Get SSO ID on server

2011-08-12 Thread Chema
> Why bother?
>
> "
> As soon as the user logs out of one web application (for example, by
> invalidating the corresponding session if form based login is used), the
> user's sessions in all web applications will be invalidated. Any
> subsequent attempt to access a protected resource in any application
> will require the user to authenticate himself or herself again.
> "

Right.
But the application requires than an administrator can expulse an
user. It's a client requirement.
So,  I need to record all "SSO sessions"
FYI, I made it using by JSESSIONIDSSO cookie and works fine

Thanks

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



Re: Parallel Deployment & Sessions: What am I Missing?

2011-08-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jonathan,

On 8/12/2011 2:14 PM, Jonathan Rosenberg wrote:
> I am using the same browser instance.  Just reloading the page.

Good.

> Tomcat manager confirms the existence of a session.  I am the only 
> user of this test machine, os no confusion there.

Does the manager confirm that both webapps are still deployed? If so,
does it have different session counts for both deployments?

> Are there any config settings that would disable parallel
> deployment?

None that I know of.

> I'm at a loss, since this test case is o simple.

It does seem like it should work. This *is* a relatively new feature, so
it's possible that there are some problems with it. I think you might
need a comment from markt, as he's the one who built this feature and he
might have some thoughts as to why it's not working as expected.

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

iEUEARECAAYFAk5FdNoACgkQ9CaO5/Lv0PChDgCYrauN4A+ib+6qzY+AWLPEeVvZ
tgCfakcS16fWlSXh7kNhInXZFrmWoqE=
=yoEa
-END PGP SIGNATURE-

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



RE: nested context issue in tomcat 7

2011-08-12 Thread Caldarale, Charles R
> From: Bijesh Vijayan [mailto:bije...@gmail.com] 
> Subject: Re: nested context issue in tomcat 7

> So you mean to say that my URL should be changed for the 
> second context ?

No, continue to use the slash in the URL; only the location in the file system 
contains the # as a place-holder for the slash.

> My context files are located at (I changed the file name
> Reports-context.xml to Employee#Reports.xml so that it match the
> context path in URL )

> /home/bijesh/tomcat/conf/Catalina/localhost/Employee.xml
> /home/bijesh/tomcat/conf/Catalina/localhost/Employee#Reports.xml

Good; that all looks proper.

 - 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



Re: Parallel Deployment & Sessions: What am I Missing?

2011-08-12 Thread Jonathan Rosenberg
I just reverified that session info is being sent (i.e., JSESSIONID).
Yes, that's the client cookie.

--
Jonathan Rosenberg
Founder & Executive Director
Tabby's Place, a Cat Sanctuary
http://www.tabbysplace.org/


On Fri, Aug 12, 2011 at 2:32 PM, Christopher Schultz
 wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Chuck,
>
> On 8/12/2011 2:13 PM, Caldarale, Charles R wrote:
>>> From: Caldarale, Charles R Subject: RE: Parallel Deployment &
>>> Sessions: What am I Missing?
>>
 Results surprise me ('NEW version ')
>>
>>> Why is that surprising?  To quote from the doc:
>>
>>> "If no session information is present in the request, use the
>>> latest version."
>>
>> You might want to sniff the traffic and see if the client is sending
>> any session information; I suspect it isn't.
>
> Jonathan's post from yesterday says he used Firebug and it looks like
> the JSESSIONID isn't changing... I suspect that's the client's cookie
> that he's describing.
>
> - -chris
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk5FcdQACgkQ9CaO5/Lv0PC4TwCfe/+LqdUTjlmv3sF086YXSAMR
> egsAn14aI8AVYpF+qmJn0gKVWKFT019Z
> =ZQfx
> -END PGP SIGNATURE-
>
> -
> 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: nested context issue in tomcat 7

2011-08-12 Thread Bijesh Vijayan
Thanks Charles / Thomas,

> This is not supported. You need to move
> /home/bijesh/webapps/Employee/Reports
> to
> /home/bijesh/webapps/Employee#Reports
>
> and then specify your context as:
> 

Thanks, I will be moving the  Reports to
/home/bijesh/webapps/Employee#Reports

>> Where can I mention the path.my URLs are
>> http://localhost:8080/Employee/logon.do
>> http://localhost:8080/Employee/Reports/first.do
>
>> Thanks for the suggestion, but we are migrating from tomcat 5 to
>> tomcat 7. Things work fine in tomcat 5. we would like to keep the
>> application directory structure as is.
>
> That probably isn't going to be possible. You have over-lapping
> docBase's and that is not supported.
>

So you mean to say that my URL should be changed for the second context ?
Is there a way I can retain my
URL(http://localhost:8080/Employee/Reports/first.do) , I do not want
to change to http://localhost:8080/Employee#Reports/first.do

Just wanted to confirm if things are fine from my end.
My context files are located at (I changed the file name
Reports-context.xml to Employee#Reports.xml so that it match the
context path in URL )

/home/bijesh/tomcat/conf/Catalina/localhost/Employee.xml
/home/bijesh/tomcat/conf/Catalina/localhost/Employee#Reports.xml

Thanks,
Bijesh

On Fri, Aug 12, 2011 at 1:37 PM, Mark Thomas  wrote:
> On 12/08/2011 18:23, Bijesh Vijayan wrote:
>> Thanks Charles,
>>
>>> What is the appBase setting for the  named localhost?
>> /home/bijesh/webapps
>
>> Where can I mention the path.my URLs are
>> http://localhost:8080/Employee/logon.do
>> http://localhost:8080/Employee/Reports/first.do
>
>> Thanks for the suggestion, but we are migrating from tomcat 5 to
>> tomcat 7. Things work fine in tomcat 5. we would like to keep the
>> application directory structure as is.
>
> That probably isn't going to be possible. You have over-lapping
> docBase's and that is not supported.
>
>> I am not able to give absolute path for docBase as I an getting the
>> message "docBase inside the context is ignored". I think I am getting
>> this message as docBase directory is inside appBase directory.
>
> You must not specify the docBase since it is inside the appBase. All you
> have managed to do is bypass Tomcat's warning. You may have double
> deployment as a result.
>
 file name = CATALINA_BASE/conf/Catalina/localhost/Employee.xml
                                >>>                                         docBase="./Employee"
                                         crossContext="true"
                                         reloadable="false"
                                         workDir="work/Employee">
>
> This should be:
> 
>
 file name = CATALINA_BASE/conf/Catalina/localhost/Employee#Reports.xml
                                >>>                                         docBase="./Employee/Reports"
                                         crossContext="true"
                                         reloadable="false"
                                         workDir="work/Employee/Reports">
>
> This is not supported. You need to move
> /home/bijesh/webapps/Employee/Reports
> to
> /home/bijesh/webapps/Employee#Reports
>
> and then specify your context as:
> 
>
> Mark
>
> -
> 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: Get SSO ID on server

2011-08-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chema,

On 8/12/2011 3:51 AM, Chema wrote:
>> Why do you need a consistent ID between the two apps?
> 
> Because I'll store this ID into a record in database. The apps
> checking every 60 sec if this record exists and, if dont , perform a
> logout

Why bother?

"
As soon as the user logs out of one web application (for example, by
invalidating the corresponding session if form based login is used), the
user's sessions in all web applications will be invalidated. Any
subsequent attempt to access a protected resource in any application
will require the user to authenticate himself or herself again.
"

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

iEYEARECAAYFAk5Fcj8ACgkQ9CaO5/Lv0PDtcgCfUG72Ye6OwBBbP6hH2b5egWeZ
QAsAoKSPB+FegDV4JQSpPxO8m0POpAM8
=Kzfn
-END PGP SIGNATURE-

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



Re: Parallel Deployment & Sessions: What am I Missing?

2011-08-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chuck,

On 8/12/2011 2:13 PM, Caldarale, Charles R wrote:
>> From: Caldarale, Charles R Subject: RE: Parallel Deployment &
>> Sessions: What am I Missing?
> 
>>> Results surprise me ('NEW version ')
> 
>> Why is that surprising?  To quote from the doc:
> 
>> "If no session information is present in the request, use the
>> latest version."
> 
> You might want to sniff the traffic and see if the client is sending
> any session information; I suspect it isn't.

Jonathan's post from yesterday says he used Firebug and it looks like
the JSESSIONID isn't changing... I suspect that's the client's cookie
that he's describing.

- -chris

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

iEYEARECAAYFAk5FcdQACgkQ9CaO5/Lv0PC4TwCfe/+LqdUTjlmv3sF086YXSAMR
egsAn14aI8AVYpF+qmJn0gKVWKFT019Z
=ZQfx
-END PGP SIGNATURE-

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



Re: Cannot make war file as default app

2011-08-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

G,

On 8/12/2011 4:55 AM, exquisite wrote:
> Hey Mark, I think i figured out what's going on with my
> configuration and I feel that the Tomcat Documentation is not too
> clear explaining this particular step.
> 
> I have been editing the server.xml in the $CATALINA_HOME/conf 
> directory, dropped my war in $CATALINA_HOME/webapps directory but by 
> default tomcat distribution comes with ROOT folder inside webapps 
> directory and there by its not able to deploy my war file as ROOT.

If that's the case, then you have not properly disabled auto-deploy in
your . That's the only way that the webapps/ROOT directory should
interfere.

Seriously, what's wrong with re-naming your WAR file to ROOT.war? It.
Just. Solves. So. Many. Problems.

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

iEYEARECAAYFAk5Fbz0ACgkQ9CaO5/Lv0PAV1QCfXhoknQcGOSUN3jwHmw21b2iI
angAoKUgJPT63bD1XwNrED0DkZcKuyOT
=Vg+1
-END PGP SIGNATURE-

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



Re: Parallel Deployment & Sessions: What am I Missing?

2011-08-12 Thread Jonathan Rosenberg
Chris,

I am using the same browser instance.  Just reloading the page.

Tomcat manager confirms the existence of a session.  I am the only
user of this test machine, os no confusion there.

Are there any config settings that would disable parallel deployment?

I'm at a loss, since this test case is o simple.

--
Jonathan Rosenberg
Founder & Executive Director
Tabby's Place, a Cat Sanctuary
http://www.tabbysplace.org/


On Fri, Aug 12, 2011 at 2:10 PM, Christopher Schultz
 wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Jonathan,
>
> On 8/12/2011 11:02 AM, Jonathan Rosenberg wrote:
>> 1) Copy foo##001.war to webapps & visit /foo.  Results as expected
>> ('old version'). 2) Copy foo##002.war to webapps & reload /foo.
>> Results surprise me ('NEW version ')
>>
>> What am I missing here?
>
> I would have expected you getting the old version as well, but only if
> you had a session. IIRC, sessions are automatically created by any JSP
> that doesn't specifically disable them.
>
> Are you using the same window / same browser without a restart or
> anything when you visit the page for the second time?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk5FbHwACgkQ9CaO5/Lv0PBGeACfajrlRMDl/K980mAdGwhlOqlS
> 5X8AnAk6/owcrZcba3BzjEUUKnjW4BtS
> =Dcgy
> -END PGP SIGNATURE-
>
> -
> 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: Parallel Deployment & Sessions: What am I Missing?

2011-08-12 Thread Caldarale, Charles R
> From: Caldarale, Charles R 
> Subject: RE: Parallel Deployment & Sessions: What am I Missing?

> > Results surprise me ('NEW version ')

> Why is that surprising?  To quote from the doc:

> "If no session information is present in the request, use the latest version."

You might want to sniff the traffic and see if the client is sending any 
session information; I suspect it isn't.

 - 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



RE: Parallel Deployment & Sessions: What am I Missing?

2011-08-12 Thread Caldarale, Charles R
> From: shmol...@gmail.com [mailto:shmol...@gmail.com] On Behalf Of Jonathan 
> Rosenberg
> Subject: Re: Parallel Deployment & Sessions: What am I Missing?

> 1) Copy foo##001.war to webapps & visit /foo.  
> Results as expected ('old version').

Fine so far.

> 2) Copy foo##002.war to webapps & reload /foo.

By "reload", do you mean reload the webapp via the manager interface?  Or just 
reentering the URL?

> Results surprise me ('NEW version ')

Why is that surprising?  To quote from the doc:

"If no session information is present in the request, use the latest version."

 - 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



Re: Parallel Deployment & Sessions: What am I Missing?

2011-08-12 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jonathan,

On 8/12/2011 11:02 AM, Jonathan Rosenberg wrote:
> 1) Copy foo##001.war to webapps & visit /foo.  Results as expected 
> ('old version'). 2) Copy foo##002.war to webapps & reload /foo.
> Results surprise me ('NEW version ')
> 
> What am I missing here?

I would have expected you getting the old version as well, but only if
you had a session. IIRC, sessions are automatically created by any JSP
that doesn't specifically disable them.

Are you using the same window / same browser without a restart or
anything when you visit the page for the second time?

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

iEYEARECAAYFAk5FbHwACgkQ9CaO5/Lv0PBGeACfajrlRMDl/K980mAdGwhlOqlS
5X8AnAk6/owcrZcba3BzjEUUKnjW4BtS
=Dcgy
-END PGP SIGNATURE-

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



Re: nested context issue in tomcat 7

2011-08-12 Thread Mark Thomas
On 12/08/2011 18:23, Bijesh Vijayan wrote:
> Thanks Charles,
> 
>> What is the appBase setting for the  named localhost?
> /home/bijesh/webapps

> Where can I mention the path.my URLs are
> http://localhost:8080/Employee/logon.do
> http://localhost:8080/Employee/Reports/first.do

> Thanks for the suggestion, but we are migrating from tomcat 5 to
> tomcat 7. Things work fine in tomcat 5. we would like to keep the
> application directory structure as is.

That probably isn't going to be possible. You have over-lapping
docBase's and that is not supported.

> I am not able to give absolute path for docBase as I an getting the
> message "docBase inside the context is ignored". I think I am getting
> this message as docBase directory is inside appBase directory.

You must not specify the docBase since it is inside the appBase. All you
have managed to do is bypass Tomcat's warning. You may have double
deployment as a result.

>>> file name = CATALINA_BASE/conf/Catalina/localhost/Employee.xml
>>>>> docBase="./Employee"
>>> crossContext="true"
>>> reloadable="false"
>>> workDir="work/Employee">

This should be:


>>> file name = CATALINA_BASE/conf/Catalina/localhost/Employee#Reports.xml
>>>>> docBase="./Employee/Reports"
>>> crossContext="true"
>>> reloadable="false"
>>> workDir="work/Employee/Reports">

This is not supported. You need to move
/home/bijesh/webapps/Employee/Reports
to
/home/bijesh/webapps/Employee#Reports

and then specify your context as:


Mark

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



RE: nested context issue in tomcat 7

2011-08-12 Thread Caldarale, Charles R
> From: Bijesh Vijayan [mailto:bije...@gmail.com] 
> Subject: Re: nested context issue in tomcat 7

> Where can I mention the path.my URLs are
> http://localhost:8080/Employee/logon.do
> http://localhost:8080/Employee/Reports/first.do

The path is derived from the name of the .xml file containing the  
element.  I cannot be set in the  element itself, unless the  
is in server.xml - which is strongly discouraged.

> Thanks for the suggestion

It's not a suggestion.

> we are migrating from tomcat 5 to tomcat 7. Things work 
> fine in tomcat 5. we would like to keep the
> application directory structure as is.

Just because an illegal arrangement happened to give you usable results in one 
version does not mean it was correct.  You must change it.  Tomcat 7 is better 
at detecting invalid configurations.

> I think I am getting this message as docBase directory is 
> inside appBase directory.

Correct; docBase is not allowed if the webapps are deployed under the  
appBase; in that case, you need to remove both docBase attributes and place the 
Employee/Reports webapp in /home/bijesh/webapps/Employee#Reports, so it matches 
the name on the .xml file.

 - 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



Re: nested context issue in tomcat 7

2011-08-12 Thread Bijesh Vijayan
Thanks Charles,

> What is the appBase setting for the  named localhost?
/home/bijesh/webapps

>> file name = CATALINA_BASE/conf/Catalina/localhost/Employee.xml
>>> docBase="./Employee"
>> crossContext="true"
>> reloadable="false"
>> workDir="work/Employee">
>
> The path attribute is not allowed here; remove it.  Otherwise, the rest of 
> the above is probably ok, depending on the value of appBase in the  
> element of server.xml.
>

Where can I mention the path.my URLs are
http://localhost:8080/Employee/logon.do
http://localhost:8080/Employee/Reports/first.do


> Again, the path attribute is not allowed; remove it.  Note that you may not 
> nest webapps; try placing the Employee/Reports webapp in 
> /home/bijesh/webapps/EmployeeReports and adjust docBase appropriately.  I 
> would also suggest making the docBase attributes absolute paths, since a 
> relative location is not terribly robust.

Thanks for the suggestion, but we are migrating from tomcat 5 to
tomcat 7. Things work fine in tomcat 5. we would like to keep the
application directory structure as is.

I am not able to give absolute path for docBase as I an getting the
message "docBase inside the context is ignored". I think I am getting
this message as docBase directory is inside appBase directory.

Thanks,
Bijesh.

On Fri, Aug 12, 2011 at 1:04 PM, Caldarale, Charles R
 wrote:
>> From: Bijesh Vijayan [mailto:bije...@gmail.com]
>> Subject: nested context issue in tomcat 7
>
>> file name = CATALINA_BASE/conf/Catalina/localhost/Employee.xml
>>                                >                                         docBase="./Employee"
>>                                         crossContext="true"
>>                                         reloadable="false"
>>                                         workDir="work/Employee">
>
> The path attribute is not allowed here; remove it.  Otherwise, the rest of 
> the above is probably ok, depending on the value of appBase in the  
> element of server.xml.
>
>> file name = CATALINA_BASE/conf/Catalina/localhost/Employee#Reports.xml
>>                                >                                         docBase="./Employee/Reports"
>>                                         crossContext="true"
>>                                         reloadable="false"
>>                                         workDir="work/Employee/Reports">
>
> Again, the path attribute is not allowed; remove it.  Note that you may not 
> nest webapps; try placing the Employee/Reports webapp in 
> /home/bijesh/webapps/EmployeeReports and adjust docBase appropriately.  I 
> would also suggest making the docBase attributes absolute paths, since a 
> relative location is not terribly robust.
>
> What is the appBase setting for the  named localhost?
>
>  - 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



How do I log to a filename based on the full context name?

2011-08-12 Thread chris derham
Reading
http://www.javacodegeeks.com/2011/06/zero-downtime-deployment-and-rollback.html?m=1,
it states

If you do not use the full context name of the application in the log file
name, you may end up in a situation where both versions of a web application
are writing into the same log file

So how do I get this full context name? We currently use the following to
configure the filename under log4j 1.2.16 under tomcat 7.0.19 on windows
2008 64bit



Thanks

Chris


RE: nested context issue in tomcat 7

2011-08-12 Thread Caldarale, Charles R
> From: Bijesh Vijayan [mailto:bije...@gmail.com] 
> Subject: nested context issue in tomcat 7

> file name = CATALINA_BASE/conf/Catalina/localhost/Employee.xml
> docBase="./Employee"
> crossContext="true"
> reloadable="false"
> workDir="work/Employee">

The path attribute is not allowed here; remove it.  Otherwise, the rest of the 
above is probably ok, depending on the value of appBase in the  element 
of server.xml.

> file name = CATALINA_BASE/conf/Catalina/localhost/Employee#Reports.xml
> docBase="./Employee/Reports"
> crossContext="true"
> reloadable="false"
> workDir="work/Employee/Reports">

Again, the path attribute is not allowed; remove it.  Note that you may not 
nest webapps; try placing the Employee/Reports webapp in 
/home/bijesh/webapps/EmployeeReports and adjust docBase appropriately.  I would 
also suggest making the docBase attributes absolute paths, since a relative 
location is not terribly robust.

What is the appBase setting for the  named localhost?

 - 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



Re: nested context issue in tomcat 7

2011-08-12 Thread Bijesh Vijayan
Thanks Andre,

> If that interpretation is correct, it would mean that docBase is "wherever
> Tomcat happens to be running now" + a subdirectory "Employee".
> Is that what you mean here ?
No I mean my doc base is outside the tomcat directory.
I mean my context to be inside the appBase(/home/bijesh/webapps)

my absolute context directories are
/home/bijesh/webapps/Employee
/home/bijesh/webapps/Employee/Reports

my tomcat directory is in
/home/bijesh/tomcat

Thanks,
Bijesh


On Fri, Aug 12, 2011 at 12:51 PM, André Warnier  wrote:
> Bijesh Vijayan wrote:
> ...
>
>>
>> file name = CATALINA_BASE/conf/Catalina/localhost/Employee.xml
>>                               >                                        docBase="./Employee"
>
> Hi.
> I find this docBase "suspicious", in the sense that it is (I think ) an
> absolute path specification, based on "." which usually means "the current
> directory".
> If that interpretation is correct, it would mean that docBase is "wherever
> Tomcat happens to be running now" + a subdirectory "Employee".
> Is that what you mean here ?
>
>
> -
> 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: nested context issue in tomcat 7

2011-08-12 Thread André Warnier

Bijesh Vijayan wrote:
...



file name = CATALINA_BASE/conf/Catalina/localhost/Employee.xml
   

Hi.
I find this docBase "suspicious", in the sense that it is (I think ) an absolute path 
specification, based on "." which usually means "the current directory".
If that interpretation is correct, it would mean that docBase is "wherever Tomcat happens 
to be running now" + a subdirectory "Employee".

Is that what you mean here ?


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



nested context issue in tomcat 7

2011-08-12 Thread Bijesh Vijayan
I have a appBase(/home/bijesh/webapps/) outside by CATALINA_BASE(same
as CATALINA_HOME - /home/bijesh/tomcat).
I have 2 context files, one

file name = CATALINA_BASE/conf/Catalina/localhost/Employee.xml
   

file name = CATALINA_BASE/conf/Catalina/localhost/Employee#Reports.xml
   

But tomcat is not looking at docBase(as docBase is given inside
appBase, if the docBase is inside appBase, it will look for file
name), it is looking at direcotry
/home/bijesh/webapps/Employee(this is working fine) and
/home/bijesh/webapps/Employee#Reports(this is not working).

I have named the file as per tomcat documentation -
http://tomcat.apache.org/tomcat-7.0-doc/config/context.html
Please let me know how I can load the second context. I want to keep I
do not want to change by appBase in server.xml.

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



Re: Parallel Deployment & Sessions: What am I Missing?

2011-08-12 Thread Jonathan Rosenberg
So, it's gotta be something simple I'm missing.  I decided to
construct a trivial test of parallel deployment.

Couldn't be simpler
(http://www.javacodegeeks.com/2011/06/zero-downtime-deployment-and-rollback.html?m=1):

$ mkdir WEB-INF
$ echo "" > WEB-INF/web.xml
$ echo 'old version ' > index.jsp
$ jar cf foo##001.war WEB-INF index.jsp
$ echo 'NEW version ' > index.jsp
$ jar cf foo##002.war WEB-INF index.jsp

1) Copy foo##001.war to webapps & visit /foo.  Results as expected
('old version').
2) Copy foo##002.war to webapps & reload /foo.  Results surprise me
('NEW version ')

What am I missing here?

--
Jonathan Rosenberg
Founder & Executive Director
Tabby's Place, a Cat Sanctuary
http://www.tabbysplace.org/


On Fri, Aug 12, 2011 at 4:08 AM, Pid  wrote:
> On 12/08/2011 04:01, Jonathan Rosenberg wrote:
>> Trying to fall asleep and just had a thought on my problem: are
>> context-param values shared across different context versions (as
>> implemented in parallel deployment)?
>
> Nope.  The apps are self-contained.
>
> C
>
>
>
>
>> --
>> JR
>>  On Aug 11, 2011 6:10 PM, "Jonathan Rosenberg"  wrote:
>>> BTW: I'm using
>>>
>>> Apache Tomcat/7.0.6 JDK 1.6.0_22-b04
>>>
>>> on Linux.
>>>
>>> --
>>> Jonathan Rosenberg
>>> Founder & Executive Director
>>> Tabby's Place, a Cat Sanctuary
>>> http://www.tabbysplace.org/
>>>
>>>
>>> On Thu, Aug 11, 2011 at 6:00 PM, Jonathan Rosenberg 
>> wrote:
 Great idea.  I just retested aith Firebug & the JSESSIONIDs are
>> identical.

 Ideas, anyone?

 --
 Jonathan Rosenberg
 Founder & Executive Director
 Tabby's Place, a Cat Sanctuary
 http://www.tabbysplace.org/


 On Thu, Aug 11, 2011 at 5:01 PM, Mark Thomas  wrote:
> On 11/08/2011 21:56, Jonathan Rosenberg wrote:
>> Following up on my post the other day ... I figured out a clean way to
>> generate a Catalog##~~~.war Grails app that just yields an outage
>> page.
>>
>> Today I deployed & tested & sessions are not behaving as I expected.
>> Here's what I have
>>
>> 1) Deployed Catalog##0002.war.& started.
>> 2) Access app (/Catalog) & start a session (confirmed in Tomcat
>> Manager).
>> 3) Deploy Catalog##~~~.war & started.
>> 4) Access app again (/Catalog).  I immediately get the outage page.
>> 5) Stop Catalog##~~~.
>> 5) Access /Catalog.  Session is back.
>>
>> I was expecting to see the original app, not an outage page.  I
>> checked in Manager & it shows 1 session associated with Catalog##0002
>> and none with Catalog##~~~, as expected.
>>
>> Am I confused as to what should be happening?
>
> Use fiddler, firebug or similar to look at the headers being sent to
> Tomcat. Check the session IDs match up.
>
> Mark
>
> -
> 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: Cannot make war file as default app

2011-08-12 Thread Caldarale, Charles R
> From: exquisite [mailto:gautam_exquis...@yahoo.com] 
> Subject: Re: Cannot make war file as default app

> i did not want to rename my war to ROOT.war

And thereby make a lot more work for yourself.  Simply rename it and be done.

Using the horribly outdated and restrictive mechanism of placing  
elements in server.xml comes from the dark ages; don't go there.

 - 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



RE: Sticky Session Not Working With Apache 2.0.54 and Tomcat 7.0.8

2011-08-12 Thread Lataxes, Karl
The jvmRoute's for both server.xmls are properly set to the worker names and 
are not commented out.  This was the first thing I verified.


 

Here are the settings in workers.properties (worker tomcat7A identical to 
tomcat7C except for port, since both are running on the same server for 
testing.  In production, we will probably install them on separate boxes):

worker.list=loadbalancer,jkstatus
worker.tomcat7C.type=ajp13
worker.tomcat7C.host=
worker.tomcat7C.port=4931
worker.tomcat7C.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.balance_workers=tomcat7A,tomcat7C
worker.loadbalancer.sticky_session=1
worker.jkstatus.type=status

Here are the JkMount settings in mod_jk.conf:

JkMount /jkmanager/* jkstatus
JkMount / servlet/* loadbalancer

Load balancing is working, but subsequent requests from a single client are 
being routed to the other Tomcat instance despite sticky_session being set to 1.

-Original Message-
From: Rainer Jung [mailto:rainer.j...@kippdata.de] 
Sent: Friday, August 12, 2011 4:17 AM
To: users@tomcat.apache.org
Subject: Re: Sticky Session Not Working With Apache 2.0.54 and Tomcat 7.0.8

On 11.08.2011 15:32, Lataxes, Karl wrote:
> OK, I'm getting close.  On the server side, I'm adding a "Set-Cookie" header 
> containing the session id I want to use.  The client emulator I am using has 
> similarly been modified to add a "Cookie" header with the session id sent by 
> the server, but sticky sessions are still not working.  In the mod_jk log, 
> there is a "searching worker for partial sessionid" reference that contains 
> the correct session id, but "." was not appended.  In my 
> workers.properties file, "sticky_session" is set to 1.  The "jvmRoute" 
> parameters in my respective Tomcat server.xml files are set to the workers 
> identified in the workers.properties file as well.   What do I have to do to 
> append "." to the outgoing session id?

When Tomcat sets a session cookie, and you correctly set the jvmRoute in 
server.xml, it automatically adds the value of jvmRoute to the end of the 
session id, separated with a dot.

Make sure you did not set the jvmRoute in some line in server.xml that is 
cmmented out.

To make stickyness with mod_jk happen, the jvmRoute used for Tomcat should be 
equal to the name of the worker pointing to the Tomcat instance. Finally you 
add all those workers to a load balancer worker in mod_jk and JkMount the URLs 
to the load balancer worker.

Regards,

Rainer


-
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



[SECURITY] CVE-2011-2481: Apache Tomcat information disclosure vulnerability

2011-08-12 Thread Mark Thomas
CVE-2011-2481: Apache Tomcat information disclosure vulnerability

Severity: low

Vendor:
The Apache Software Foundation

Versions Affected:
Tomcat 7.0.0 to 7.0.16
Previous versions are not affected.

Description:
The re-factoring of XML validation for Tomcat 7.0.x re-introduced the
vulnerability previously reported as CVE-2009-0783. This was initially
reported as a memory leak
(https://issues.apache.org/bugzilla/show_bug.cgi?id=51395). If a web
application is the first web
application loaded, this bug allows that web application to potentially
view and/or alter the web.xml, context.xml and tld files of other web
applications deployed on the Tomcat instance.

Mitigation:
7.0.x users should upgrade to 7.0.17 or later

Example:
See https://issues.apache.org/bugzilla/show_bug.cgi?id=29936#c12 for an
example web application that can be used to replace the XML parser used
by Tomcat.

Credit:
The security implications of bug 51395 were identified by the Tomcat
security team.

References:
http://tomcat.apache.org/security.html
http://tomcat.apache.org/security-7.html

The Apache Tomcat Security Team

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



[SECURITY] CVE-2011-2729: Commons Daemon fails to drop capabilities (Apache Tomcat)

2011-08-12 Thread Mark Thomas
CVE-2011-2729: Commons Daemon fails to drop capabilities (Apache Tomcat)

Severity: Important

Vendor:
The Apache Software Foundation

Versions Affected:
Tomcat 7.0.0 to 7.0.19
Tomcat 6.0.30 to 6.0.32
Tomcat 5.5.32 to 5.5.33

Description:
Due to a bug in the capabilities code, jsvc (the service wrapper for
Linux that is part of the Commons Daemon project) does not drop
capabilities allowing the application to access files and directories
owned by superuser. This vulnerability only applies if:
a) Tomcat is running on a Linux operating system
b) jsvc was compiled with libcap
c) -user parameter is used
The Tomcat versions above shipped with source files for jsvc that
included this vulnerability.

Mitigation:
Affected users of all versions can mitigate these vulnerabilities by
taking any of the following actions:
a) upgrade to jsvc 1.0.7 or later
b) do not use -user parameter to switch user
c) recompile the jsvc without libcap support
Updated jsvc source is included in Apache Tomcat 7.0.20 and will be
included in the next releases of Tomcat 6.0.x and 5.5.x. Updated source
can be obtained from the Apache Commons Daemon project.

Credit:
This issue was identified by Wilfried Weissmann.

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



Re: Availability of Tomcat 5.5.34

2011-08-12 Thread Jim Jagielski
My plan is to T&R 5.5.34 the week after next… I'm traveling next
week :/

On Aug 12, 2011, at 12:25 AM, Sachin Mankapure wrote:

> 
> Hi Jim,
> 
> Is there any update on release date of 5.5.34?
> 
> Thanks,
> -Sachin
> 
> 
> Jim Jagielski wrote:
>> 
>> I am tempted to do a release next week... we seem to have enough
>> to warrant it.
>> 
>> On Jul 21, 2011, at 5:57 AM, Sachin Mankapure wrote:
>> 
>>> 
>>> Thanks.  I wanted to know *when* 5.5.34 will be available.  I got the
>>> answer.
>>> 
>>> 
>>> Konstantin Kolinko wrote:
 
 2011/7/20 msachin :
> 
> Where can I get information about availability of Tomcat 5.3.34? 
> Thanks.
 
 Here:
 http://tomcat.apache.org/download-55.cgi
 http://tomcat.apache.org/whichversion.html
 
 If you want o be notified about release you can subscribe to the
 announce@ mailing list
 
 I do not think that it can happen sooner than next release of 6.0.
 There is not much activity with Tomcat 5.5 development.
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 
 
 
>>> 
>>> -- 
>>> View this message in context:
>>> http://old.nabble.com/Availability-of-Tomcat-5.5.34-tp32098293p32106146.html
>>> Sent from the Tomcat - User mailing list archive at Nabble.com.
>>> 
>>> 
>>> -
>>> 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
>> 
>> 
>> 
> 
> -- 
> View this message in context: 
> http://old.nabble.com/Availability-of-Tomcat-5.5.34-tp32098293p32247100.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
> 
> 
> -
> 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: Apache Tomcat unable to send the request. tomcat throwing 502 Gate Way error

2011-08-12 Thread Pid
On 12/08/2011 12:31, rakesh k wrote:
> Hi Igor Cicimov
> 
> Thank you very much for replying ..
> port="8082" protocol="HTTP/1.1"
>connectionTimeout="2"
>redirectPort="8443" />
> 

That doesn't answer the question.

Please remove all of the commented parts of the server.xml and paste the
whole thing, inline, into your next reply.



> I am heryby attaching the proxy pass which we used to connect tomcat through
> apache.

(You're not attaching it.)


p

> ProxyPass / balancer://msf/ stickysession=JSESSIONID|jsessionid
> 
> 
>  BalancerMember http://localhost:8082 route=msf1
> 
> 
> 
> 
> 
> This is what we use in the produciton scenario, the above mentioned
> configuration is the exact executor configuration we used for this scenario.
> 
> 
> can you please help on this since we are running this on production which
> has to be resolved.
> Regards
> Rakesh
> 
> 
> On Fri, Aug 12, 2011 at 3:56 PM, Igor Cicimov  wrote:
> 
>> I can't see the connection between the Connector you showed and port 8082.
>> What is listening on port 8082? Also what is your "tomcatThreadPool"
>> executor configuration?
>>
>>
>> On Fri, Aug 12, 2011 at 7:56 PM, rakesh k  wrote:
>>
>>> Hi All
>>>
>>> I am using Apache tomcat 6.0.18 version
>>>
>>> I am not sure, why the tomcat is giving us this problem. While doing Load
>>> testing we are sending 5000 requests at a time, where we are getting 4-5
>>> Bad
>>> gate way error.
>>>
>>> Please find the error details below
>>>
>>> [Wed Aug 10 01:00:50 2011] [error] (103)Software caused connection abort:
>>> proxy: pass request body failed to 127.0.0.3:8082 (localhost)
>>> [Wed Aug 10 01:00:50 2011] [error] proxy: pass request body failed to
>>> 127.0.0.3:8082 (localhost) from 72.163.25.205 ()
>>> [Wed Aug 10 01:01:01 2011] [error] (103)Software caused connection abort:
>>> proxy: pass request body failed to 127.0.0.3:8082 (localhost)
>>> [Wed Aug 10 01:01:01 2011] [error] proxy: pass request body failed to
>>> 127.0.0.3:8082 (localhost) from 72.163.25.206 ()
>>> [Wed Aug 10 01:28:04 2011] [error] (103)Software caused connection abort:
>>> proxy: pass request body failed to 127.0.0.3:8082 (localhost)
>>> [Wed Aug 10 01:28:04 2011] [error] proxy: pass request body failed to
>>> 127.0.0.3:8082 (localhost) from 72.163.25.205 ()
>>> [Wed Aug 10 06:10:49 2011] [error] (103)Software caused connection abort:
>>> proxy: pass request body failed to 127.0.0.3:8082 (localhost)
>>> [Wed Aug 10 06:10:49 2011] [error] proxy: pass request body failed to
>>> 127.0.0.3:8082 (localhost) from 72.163.25.206 ()
>>> [Wed Aug 10 19:01:18 2011] [error] (103)Software caused connection abort:
>>> proxy: pass request body failed to 127.0.0.3:8082 (localhost)
>>> [Wed Aug 10 19:01:18 2011] [error] proxy: pass request body failed to
>>> 127.0.0.3:8082 (localhost) from 72.163.5.38 ()
>>>
>>>
>>> I am also attaching the tomcat configuration like server.xml with this
>>> question,
>>>
>>> can you please help how to get out this issue, if you require anything
>> from
>>> me i can proivude the etire details.
>>>
>>> Please find the server.xml tomcat connector attribute portion.
>>>
>>>
>>>>>   port="8080" protocol="HTTP/1.1"
>>>   connectionTimeout="2"
>>>   redirectPort="8443" />
>>>
>>> can you please help me ragarding this issue.
>>>
>>>
>>> Regards
>>> Rakesh
>>>
>>
> 


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



Re: Apache Tomcat unable to send the request. tomcat throwing 502 Gate Way error

2011-08-12 Thread rakesh k
Hi Igor Cicimov

Thank you very much for replying ..





I am heryby attaching the proxy pass which we used to connect tomcat through
apache.

ProxyPass / balancer://msf/ stickysession=JSESSIONID|jsessionid


 BalancerMember http://localhost:8082 route=msf1





This is what we use in the produciton scenario, the above mentioned
configuration is the exact executor configuration we used for this scenario.


can you please help on this since we are running this on production which
has to be resolved.
Regards
Rakesh


On Fri, Aug 12, 2011 at 3:56 PM, Igor Cicimov  wrote:

> I can't see the connection between the Connector you showed and port 8082.
> What is listening on port 8082? Also what is your "tomcatThreadPool"
> executor configuration?
>
>
> On Fri, Aug 12, 2011 at 7:56 PM, rakesh k  wrote:
>
> > Hi All
> >
> > I am using Apache tomcat 6.0.18 version
> >
> > I am not sure, why the tomcat is giving us this problem. While doing Load
> > testing we are sending 5000 requests at a time, where we are getting 4-5
> > Bad
> > gate way error.
> >
> > Please find the error details below
> >
> > [Wed Aug 10 01:00:50 2011] [error] (103)Software caused connection abort:
> > proxy: pass request body failed to 127.0.0.3:8082 (localhost)
> > [Wed Aug 10 01:00:50 2011] [error] proxy: pass request body failed to
> > 127.0.0.3:8082 (localhost) from 72.163.25.205 ()
> > [Wed Aug 10 01:01:01 2011] [error] (103)Software caused connection abort:
> > proxy: pass request body failed to 127.0.0.3:8082 (localhost)
> > [Wed Aug 10 01:01:01 2011] [error] proxy: pass request body failed to
> > 127.0.0.3:8082 (localhost) from 72.163.25.206 ()
> > [Wed Aug 10 01:28:04 2011] [error] (103)Software caused connection abort:
> > proxy: pass request body failed to 127.0.0.3:8082 (localhost)
> > [Wed Aug 10 01:28:04 2011] [error] proxy: pass request body failed to
> > 127.0.0.3:8082 (localhost) from 72.163.25.205 ()
> > [Wed Aug 10 06:10:49 2011] [error] (103)Software caused connection abort:
> > proxy: pass request body failed to 127.0.0.3:8082 (localhost)
> > [Wed Aug 10 06:10:49 2011] [error] proxy: pass request body failed to
> > 127.0.0.3:8082 (localhost) from 72.163.25.206 ()
> > [Wed Aug 10 19:01:18 2011] [error] (103)Software caused connection abort:
> > proxy: pass request body failed to 127.0.0.3:8082 (localhost)
> > [Wed Aug 10 19:01:18 2011] [error] proxy: pass request body failed to
> > 127.0.0.3:8082 (localhost) from 72.163.5.38 ()
> >
> >
> > I am also attaching the tomcat configuration like server.xml with this
> > question,
> >
> > can you please help how to get out this issue, if you require anything
> from
> > me i can proivude the etire details.
> >
> > Please find the server.xml tomcat connector attribute portion.
> >
> >
> > >   port="8080" protocol="HTTP/1.1"
> >   connectionTimeout="2"
> >   redirectPort="8443" />
> >
> > can you please help me ragarding this issue.
> >
> >
> > Regards
> > Rakesh
> >
>


Re: Apache Tomcat unable to send the request. tomcat throwing 502 Gate Way error

2011-08-12 Thread Igor Cicimov
I can't see the connection between the Connector you showed and port 8082.
What is listening on port 8082? Also what is your "tomcatThreadPool"
executor configuration?


On Fri, Aug 12, 2011 at 7:56 PM, rakesh k  wrote:

> Hi All
>
> I am using Apache tomcat 6.0.18 version
>
> I am not sure, why the tomcat is giving us this problem. While doing Load
> testing we are sending 5000 requests at a time, where we are getting 4-5
> Bad
> gate way error.
>
> Please find the error details below
>
> [Wed Aug 10 01:00:50 2011] [error] (103)Software caused connection abort:
> proxy: pass request body failed to 127.0.0.3:8082 (localhost)
> [Wed Aug 10 01:00:50 2011] [error] proxy: pass request body failed to
> 127.0.0.3:8082 (localhost) from 72.163.25.205 ()
> [Wed Aug 10 01:01:01 2011] [error] (103)Software caused connection abort:
> proxy: pass request body failed to 127.0.0.3:8082 (localhost)
> [Wed Aug 10 01:01:01 2011] [error] proxy: pass request body failed to
> 127.0.0.3:8082 (localhost) from 72.163.25.206 ()
> [Wed Aug 10 01:28:04 2011] [error] (103)Software caused connection abort:
> proxy: pass request body failed to 127.0.0.3:8082 (localhost)
> [Wed Aug 10 01:28:04 2011] [error] proxy: pass request body failed to
> 127.0.0.3:8082 (localhost) from 72.163.25.205 ()
> [Wed Aug 10 06:10:49 2011] [error] (103)Software caused connection abort:
> proxy: pass request body failed to 127.0.0.3:8082 (localhost)
> [Wed Aug 10 06:10:49 2011] [error] proxy: pass request body failed to
> 127.0.0.3:8082 (localhost) from 72.163.25.206 ()
> [Wed Aug 10 19:01:18 2011] [error] (103)Software caused connection abort:
> proxy: pass request body failed to 127.0.0.3:8082 (localhost)
> [Wed Aug 10 19:01:18 2011] [error] proxy: pass request body failed to
> 127.0.0.3:8082 (localhost) from 72.163.5.38 ()
>
>
> I am also attaching the tomcat configuration like server.xml with this
> question,
>
> can you please help how to get out this issue, if you require anything from
> me i can proivude the etire details.
>
> Please find the server.xml tomcat connector attribute portion.
>
>
>   port="8080" protocol="HTTP/1.1"
>   connectionTimeout="2"
>   redirectPort="8443" />
>
> can you please help me ragarding this issue.
>
>
> Regards
> Rakesh
>


Apache Tomcat unable to send the request. tomcat throwing 502 Gate Way error

2011-08-12 Thread rakesh k
Hi All

I am using Apache tomcat 6.0.18 version

I am not sure, why the tomcat is giving us this problem. While doing Load
testing we are sending 5000 requests at a time, where we are getting 4-5 Bad
gate way error.

Please find the error details below

[Wed Aug 10 01:00:50 2011] [error] (103)Software caused connection abort:
proxy: pass request body failed to 127.0.0.3:8082 (localhost)
[Wed Aug 10 01:00:50 2011] [error] proxy: pass request body failed to
127.0.0.3:8082 (localhost) from 72.163.25.205 ()
[Wed Aug 10 01:01:01 2011] [error] (103)Software caused connection abort:
proxy: pass request body failed to 127.0.0.3:8082 (localhost)
[Wed Aug 10 01:01:01 2011] [error] proxy: pass request body failed to
127.0.0.3:8082 (localhost) from 72.163.25.206 ()
[Wed Aug 10 01:28:04 2011] [error] (103)Software caused connection abort:
proxy: pass request body failed to 127.0.0.3:8082 (localhost)
[Wed Aug 10 01:28:04 2011] [error] proxy: pass request body failed to
127.0.0.3:8082 (localhost) from 72.163.25.205 ()
[Wed Aug 10 06:10:49 2011] [error] (103)Software caused connection abort:
proxy: pass request body failed to 127.0.0.3:8082 (localhost)
[Wed Aug 10 06:10:49 2011] [error] proxy: pass request body failed to
127.0.0.3:8082 (localhost) from 72.163.25.206 ()
[Wed Aug 10 19:01:18 2011] [error] (103)Software caused connection abort:
proxy: pass request body failed to 127.0.0.3:8082 (localhost)
[Wed Aug 10 19:01:18 2011] [error] proxy: pass request body failed to
127.0.0.3:8082 (localhost) from 72.163.5.38 ()


I am also attaching the tomcat configuration like server.xml with this
question,

can you please help how to get out this issue, if you require anything from
me i can proivude the etire details.

Please find the server.xml tomcat connector attribute portion.




can you please help me ragarding this issue.


Regards
Rakesh


Apache Tomcat unable to send the request. tomcat throwing 502 Gate Way error

2011-08-12 Thread rakesh k
Hi All

I am not sure, why the tomcat is giving us this problem. While doing Load
testing we are sending 5000 requests at a time, where we are getting 4-5 Bad
gate way error.

Please find the error details below

[Wed Aug 10 01:00:50 2011] [error] (103)Software caused connection abort:
proxy: pass request body failed to 127.0.0.3:8082 (localhost)
[Wed Aug 10 01:00:50 2011] [error] proxy: pass request body failed to
127.0.0.3:8082 (localhost) from 72.163.25.205 ()
[Wed Aug 10 01:01:01 2011] [error] (103)Software caused connection abort:
proxy: pass request body failed to 127.0.0.3:8082 (localhost)
[Wed Aug 10 01:01:01 2011] [error] proxy: pass request body failed to
127.0.0.3:8082 (localhost) from 72.163.25.206 ()
[Wed Aug 10 01:28:04 2011] [error] (103)Software caused connection abort:
proxy: pass request body failed to 127.0.0.3:8082 (localhost)
[Wed Aug 10 01:28:04 2011] [error] proxy: pass request body failed to
127.0.0.3:8082 (localhost) from 72.163.25.205 ()
[Wed Aug 10 06:10:49 2011] [error] (103)Software caused connection abort:
proxy: pass request body failed to 127.0.0.3:8082 (localhost)
[Wed Aug 10 06:10:49 2011] [error] proxy: pass request body failed to
127.0.0.3:8082 (localhost) from 72.163.25.206 ()
[Wed Aug 10 19:01:18 2011] [error] (103)Software caused connection abort:
proxy: pass request body failed to 127.0.0.3:8082 (localhost)
[Wed Aug 10 19:01:18 2011] [error] proxy: pass request body failed to
127.0.0.3:8082 (localhost) from 72.163.5.38 ()


I am also attaching the tomcat configuration like server.xml with this
question,

can you please help how to get out this issue, if you require anything from
me i can proivude the etire details.

Please find the server.xml tomcat connector attribute portion.




can you please help me ragarding this issue.


Regards
Rakesh


[ANN] Apache Tomcat 7.0.20 released

2011-08-12 Thread Mark Thomas
The Apache Tomcat team announces the immediate availability of Apache
Tomcat 7.0.20

Apache Tomcat 7.0.20 includes bug fixes and the following new features
and fixes compared to version 7.0.19:
- JSP files with dependencies in JARs are no longer recompiled on every
access thereby improving performance.
- Update to version 1.1.22 of the native component of the AJP and HTTP
APR/native connectors.
- Update to Commons Daemon 1.0.7.
- Converted unit tests to JUnit 4.

Please refer to the change log for the complete list of changes:
http://tomcat.apache.org/tomcat-7.0-doc/changelog.html

Note that this version has 4 zip binaries: a generic one and three
bundled with Tomcat native binaries for Windows operating systems
running on different CPU architectures.

Downloads:
http://tomcat.apache.org/download-70.cgi

Migration guide from Apache Tomcat 5.5.x and 6.0.x:
http://tomcat.apache.org/migration.html

Thank you,

-- The Apache Tomcat Team








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



Re: Cannot make war file as default app

2011-08-12 Thread exquisite
Hi P, 

As i mentioned in my initial thread that i did not want to rename my war to 
ROOT.war so i haven't tried that route but i think i figured out whats going on 
and posted my findings already.

Thank you guys for your time and please suggest if im wrong with my solution i 
posted in my previous email.

Thanks
G



From: Pid 
To: Tomcat Users List 
Sent: Friday, August 12, 2011 1:46 AM
Subject: Re: Cannot make war file as default app

On 12/08/2011 09:32, exquisite wrote:
> Hi Mark,
> 
> I tried that way as well but i get the same issue. Tomcat does not even 
> deploy my war. All it says on console is ' Server startup in xxx ms" and 
> stays there forever.
> 
> Im getting confused and wondering if there is any mistake in the Tomcat 
> documentation.
> 
> Please suggest.

Does your app deploy, if you rename it ROOT.war and put it in the
appBase, without the Context definition in server.xml?


p


> thanks
> G
> 
> 
> 
> 
> 
> From: Mark Thomas 
> To: Tomcat Users List 
> Sent: Friday, August 12, 2011 1:19 AM
> Subject: Re: Cannot make war file as default app
> 
> On 12/08/2011 09:04, exquisite wrote:
>> Hello, 
>>
>> I followed the below steps from Tomcat Wiki for making my war file as the 
>> default webapp, but tomcat is not deploying my war:
>>
>> How do I make my web application be the Tomcat default application?
>>
>> Method 2.2 
>> If you really know what you are doing..
> 
> Sigh.
> 
>> - leave your war file in CATALINA_BASE/webapps, under its original name
>> - turn off autoDeploy and deployOnStartup in your Host element in the 
>> server.xml file.
>> - explicitly define all application Contexts in 
>> server.xml, specifying both path and docBase. You must do this, because 
>> you have disabled all the Tomcat auto-deploy mechanisms, and Tomcat will not 
>> deploy your applications anymore unless it finds their Context in 
>> the server.xml.
>>
>> I did exactly like they said in WIKI (autoDeploy=false, 
>> deployOnStartup=false) , but after doing all this, Tomcat does not even 
>> deploy my war file. here is my host configuration in server.xml after my 
>> changes:
>>
>> >              unpackWARs="true" autoDeploy="false" deployOnStartup="false"
>>              xmlValidation="false" xmlNamespaceAware="false">
>>            
>>          
> 
> You claim to be deploying a WAR file so I'd expect to see
> docBase="myapp.war"
> 
> Mark
> 
> -
> 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: Cannot make war file as default app

2011-08-12 Thread exquisite
Hey Mark,
I think i figured out what's going on with my configuration and I feel that the 
Tomcat Documentation is not too clear explaining this particular step.

I have been editing the server.xml in the $CATALINA_HOME/conf  directory, 
dropped my war in $CATALINA_HOME/webapps directory but by default tomcat 
distribution comes with ROOT folder inside webapps directory and there by its 
not able to deploy my war file as ROOT.

If I delete/rename the existing ROOT directory and with my same configuration 
once i start tomcat, then it created  a new ROOT directory with my war's 
contents in it. Now it deployed my war in ROOT directory and im able to access 
my app as root app/default app. 

As CATALINA_BASE and CATALINA_HOME both point to same location by default, I 
felt that the Tomcat documentation needs to be little clarified about this step 
for other users. For this step we can add to make sure to delete the folder 
ROOT in webapps if exists


Please let me know your thoughts or any suggestions for me. 

Thanks
G




From: exquisite 
To: Tomcat Users List 
Sent: Friday, August 12, 2011 1:32 AM
Subject: Re: Cannot make war file as default app

Hi Mark,

I tried that way as well but i get the same issue. Tomcat does not even deploy 
my war. All it says on console is ' Server startup in xxx ms" and stays there 
forever.

Im getting confused and wondering if there is any mistake in the Tomcat 
documentation.

Please suggest.

thanks
G





From: Mark Thomas 
To: Tomcat Users List 
Sent: Friday, August 12, 2011 1:19 AM
Subject: Re: Cannot make war file as default app

On 12/08/2011 09:04, exquisite wrote:
> Hello, 
> 
> I followed the below steps from Tomcat Wiki for making my war file as the 
> default webapp, but tomcat is not deploying my war:
> 
> How do I make my web application be the Tomcat default application?
> 
> Method 2.2 
> If you really know what you are doing..

Sigh.

> - leave your war file in CATALINA_BASE/webapps, under its original name
> - turn off autoDeploy and deployOnStartup in your Host element in the 
> server.xml file.
> - explicitly define all application Contexts in 
> server.xml, specifying both path and docBase. You must do this, because 
> you have disabled all the Tomcat auto-deploy mechanisms, and Tomcat will not 
> deploy your applications anymore unless it finds their Context in 
> the server.xml.
> 
> I did exactly like they said in WIKI (autoDeploy=false, 
> deployOnStartup=false) , but after doing all this, Tomcat does not even 
> deploy my war file. here is my host configuration in server.xml after my 
> changes:
> 
>              unpackWARs="true" autoDeploy="false" deployOnStartup="false"
>             xmlValidation="false" xmlNamespaceAware="false">
>            
>         

You claim to be deploying a WAR file so I'd expect to see
docBase="myapp.war"

Mark

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

Re: Cannot make war file as default app

2011-08-12 Thread Pid
On 12/08/2011 09:32, exquisite wrote:
> Hi Mark,
> 
> I tried that way as well but i get the same issue. Tomcat does not even 
> deploy my war. All it says on console is ' Server startup in xxx ms" and 
> stays there forever.
> 
> Im getting confused and wondering if there is any mistake in the Tomcat 
> documentation.
> 
> Please suggest.

Does your app deploy, if you rename it ROOT.war and put it in the
appBase, without the Context definition in server.xml?


p


> thanks
> G
> 
> 
> 
> 
> 
> From: Mark Thomas 
> To: Tomcat Users List 
> Sent: Friday, August 12, 2011 1:19 AM
> Subject: Re: Cannot make war file as default app
> 
> On 12/08/2011 09:04, exquisite wrote:
>> Hello, 
>>
>> I followed the below steps from Tomcat Wiki for making my war file as the 
>> default webapp, but tomcat is not deploying my war:
>>
>> How do I make my web application be the Tomcat default application?
>>
>> Method 2.2 
>> If you really know what you are doing..
> 
> Sigh.
> 
>> - leave your war file in CATALINA_BASE/webapps, under its original name
>> - turn off autoDeploy and deployOnStartup in your Host element in the 
>> server.xml file.
>> - explicitly define all application Contexts in 
>> server.xml, specifying both path and docBase. You must do this, because 
>> you have disabled all the Tomcat auto-deploy mechanisms, and Tomcat will not 
>> deploy your applications anymore unless it finds their Context in 
>> the server.xml.
>>
>> I did exactly like they said in WIKI (autoDeploy=false, 
>> deployOnStartup=false) , but after doing all this, Tomcat does not even 
>> deploy my war file. here is my host configuration in server.xml after my 
>> changes:
>>
>> >  unpackWARs="true" autoDeploy="false" deployOnStartup="false"
>>  xmlValidation="false" xmlNamespaceAware="false">
>> 
>>  
> 
> You claim to be deploying a WAR file so I'd expect to see
> docBase="myapp.war"
> 
> Mark
> 
> -
> 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: Cannot make war file as default app

2011-08-12 Thread exquisite
Hi Mark,

I tried that way as well but i get the same issue. Tomcat does not even deploy 
my war. All it says on console is ' Server startup in xxx ms" and stays there 
forever.

Im getting confused and wondering if there is any mistake in the Tomcat 
documentation.

Please suggest.

thanks
G





From: Mark Thomas 
To: Tomcat Users List 
Sent: Friday, August 12, 2011 1:19 AM
Subject: Re: Cannot make war file as default app

On 12/08/2011 09:04, exquisite wrote:
> Hello, 
> 
> I followed the below steps from Tomcat Wiki for making my war file as the 
> default webapp, but tomcat is not deploying my war:
> 
> How do I make my web application be the Tomcat default application?
> 
> Method 2.2 
> If you really know what you are doing..

Sigh.

> - leave your war file in CATALINA_BASE/webapps, under its original name
> - turn off autoDeploy and deployOnStartup in your Host element in the 
> server.xml file.
> - explicitly define all application Contexts in 
> server.xml, specifying both path and docBase. You must do this, because 
> you have disabled all the Tomcat auto-deploy mechanisms, and Tomcat will not 
> deploy your applications anymore unless it finds their Context in 
> the server.xml.
> 
> I did exactly like they said in WIKI (autoDeploy=false, 
> deployOnStartup=false) , but after doing all this, Tomcat does not even 
> deploy my war file. here is my host configuration in server.xml after my 
> changes:
> 
>              unpackWARs="true" autoDeploy="false" deployOnStartup="false"
>             xmlValidation="false" xmlNamespaceAware="false">
>            
>         

You claim to be deploying a WAR file so I'd expect to see
docBase="myapp.war"

Mark

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

Re: Cannot make war file as default app

2011-08-12 Thread Mark Thomas
On 12/08/2011 09:04, exquisite wrote:
> Hello, 
> 
> I followed the below steps from Tomcat Wiki for making my war file as the 
> default webapp, but tomcat is not deploying my war:
> 
> How do I make my web application be the Tomcat default application?
> 
> Method 2.2 
> If you really know what you are doing..

Sigh.

> - leave your war file in CATALINA_BASE/webapps, under its original name
> - turn off autoDeploy and deployOnStartup in your Host element in the 
> server.xml file.
> - explicitly define all application Contexts in 
> server.xml, specifying both path and docBase. You must do this, because 
> you have disabled all the Tomcat auto-deploy mechanisms, and Tomcat will not 
> deploy your applications anymore unless it finds their Context in 
> the server.xml.
> 
> I did exactly like they said in WIKI (autoDeploy=false, 
> deployOnStartup=false) , but after doing all this, Tomcat does not even 
> deploy my war file. here is my host configuration in server.xml after my 
> changes:
> 
>  unpackWARs="true" autoDeploy="false" deployOnStartup="false"
> xmlValidation="false" xmlNamespaceAware="false">
> 
> 

You claim to be deploying a WAR file so I'd expect to see
docBase="myapp.war"

Mark

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



Re: Sticky Session Not Working With Apache 2.0.54 and Tomcat 7.0.8

2011-08-12 Thread Rainer Jung
On 11.08.2011 15:32, Lataxes, Karl wrote:
> OK, I'm getting close.  On the server side, I'm adding a "Set-Cookie" header 
> containing the session id I want to use.  The client emulator I am using has 
> similarly been modified to add a "Cookie" header with the session id sent by 
> the server, but sticky sessions are still not working.  In the mod_jk log, 
> there is a "searching worker for partial sessionid" reference that contains 
> the correct session id, but "." was not appended.  In my 
> workers.properties file, "sticky_session" is set to 1.  The "jvmRoute" 
> parameters in my respective Tomcat server.xml files are set to the workers 
> identified in the workers.properties file as well.   What do I have to do to 
> append "." to the outgoing session id?

When Tomcat sets a session cookie, and you correctly set the jvmRoute in
server.xml, it automatically adds the value of jvmRoute to the end of
the session id, separated with a dot.

Make sure you did not set the jvmRoute in some line in server.xml that
is cmmented out.

To make stickyness with mod_jk happen, the jvmRoute used for Tomcat
should be equal to the name of the worker pointing to the Tomcat
instance. Finally you add all those workers to a load balancer worker in
mod_jk and JkMount the URLs to the load balancer worker.

Regards,

Rainer


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



Re: Cannot make war file as default app

2011-08-12 Thread exquisite
Sorry i Missed to update the Tomcat version im using:
I have Tomcat 6.0.32 running on Windows 7 and JDK 1.5

Please help.

Thanks
G




From: exquisite 
To: "users@tomcat.apache.org" 
Sent: Friday, August 12, 2011 1:04 AM
Subject: Cannot make war file as default app

Hello, 

I followed the below steps from Tomcat Wiki for making my war file as the 
default webapp, but tomcat is not deploying my war:

How do I make my web application be the Tomcat default application?

Method 2.2 
If you really know what you are doing.. - leave your war file in 
CATALINA_BASE/webapps, under its original name
- turn off autoDeploy and deployOnStartup in your Host element in the 
server.xml file.
- explicitly define all application Contexts in 
server.xml, specifying both path and docBase. You must do this, because 
you have disabled all the Tomcat auto-deploy mechanisms, and Tomcat will not 
deploy your applications anymore unless it finds their Context in 
the server.xml.

I did exactly like they said in WIKI (autoDeploy=false, deployOnStartup=false) 
, but after doing all this, Tomcat does not even deploy my war file. here is my 
host configuration in server.xml after my changes:


            
           
 

I have a war and i wanted to deploy it as war (did not want to follow other 
methods about renaming to ROOT.war or creating ROOT.xml etc) and wanted to make 
my web app as the default application.

Please help me with this.

thanks in advance
-G

Re: Parallel Deployment & Sessions: What am I Missing?

2011-08-12 Thread Pid
On 12/08/2011 04:01, Jonathan Rosenberg wrote:
> Trying to fall asleep and just had a thought on my problem: are
> context-param values shared across different context versions (as
> implemented in parallel deployment)?

Nope.  The apps are self-contained.

C




> --
> JR
>  On Aug 11, 2011 6:10 PM, "Jonathan Rosenberg"  wrote:
>> BTW: I'm using
>>
>> Apache Tomcat/7.0.6 JDK 1.6.0_22-b04
>>
>> on Linux.
>>
>> --
>> Jonathan Rosenberg
>> Founder & Executive Director
>> Tabby's Place, a Cat Sanctuary
>> http://www.tabbysplace.org/
>>
>>
>> On Thu, Aug 11, 2011 at 6:00 PM, Jonathan Rosenberg 
> wrote:
>>> Great idea.  I just retested aith Firebug & the JSESSIONIDs are
> identical.
>>>
>>> Ideas, anyone?
>>>
>>> --
>>> Jonathan Rosenberg
>>> Founder & Executive Director
>>> Tabby's Place, a Cat Sanctuary
>>> http://www.tabbysplace.org/
>>>
>>>
>>> On Thu, Aug 11, 2011 at 5:01 PM, Mark Thomas  wrote:
 On 11/08/2011 21:56, Jonathan Rosenberg wrote:
> Following up on my post the other day ... I figured out a clean way to
> generate a Catalog##~~~.war Grails app that just yields an outage
> page.
>
> Today I deployed & tested & sessions are not behaving as I expected.
> Here's what I have
>
> 1) Deployed Catalog##0002.war.& started.
> 2) Access app (/Catalog) & start a session (confirmed in Tomcat
> Manager).
> 3) Deploy Catalog##~~~.war & started.
> 4) Access app again (/Catalog).  I immediately get the outage page.
> 5) Stop Catalog##~~~.
> 5) Access /Catalog.  Session is back.
>
> I was expecting to see the original app, not an outage page.  I
> checked in Manager & it shows 1 session associated with Catalog##0002
> and none with Catalog##~~~, as expected.
>
> Am I confused as to what should be happening?

 Use fiddler, firebug or similar to look at the headers being sent to
 Tomcat. Check the session IDs match up.

 Mark

 -
 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



Cannot make war file as default app

2011-08-12 Thread exquisite
Hello, 

I followed the below steps from Tomcat Wiki for making my war file as the 
default webapp, but tomcat is not deploying my war:

How do I make my web application be the Tomcat default application?

Method 2.2 
If you really know what you are doing.. - leave your war file in 
CATALINA_BASE/webapps, under its original name
- turn off autoDeploy and deployOnStartup in your Host element in the 
server.xml file.
- explicitly define all application Contexts in 
server.xml, specifying both path and docBase. You must do this, because 
you have disabled all the Tomcat auto-deploy mechanisms, and Tomcat will not 
deploy your applications anymore unless it finds their Context in 
the server.xml.

I did exactly like they said in WIKI (autoDeploy=false, deployOnStartup=false) 
, but after doing all this, Tomcat does not even deploy my war file. here is my 
host configuration in server.xml after my changes:


            
           
 

I have a war and i wanted to deploy it as war (did not want to follow other 
methods about renaming to ROOT.war or creating ROOT.xml etc) and wanted to make 
my web app as the default application.

Please help me with this.

thanks in advance
-G

Re: Get SSO ID on server

2011-08-12 Thread Chema
> Why do you need a consistent ID between the two apps?

Because I'll store this ID into a record in database.
The apps checking every 60 sec if this record exists and, if dont ,
perform a logout

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



Re: Generating SSL certificates

2011-08-12 Thread Pid
On 12/08/2011 02:26, Darryl Lewis wrote:
> Our certificates are about to expire and I need to generate new ones for 
> tomcat. I'm using keytool, but getting a strange error.

Please start an entirely new thread, rather than replying to an existing
email & just editing the subject & body (which is called thread hijacking).


p


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



Re: Get SSO ID on server

2011-08-12 Thread Pid
On 11/08/2011 22:31, Christopher Schultz wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Chema,
> 
> On 8/11/2011 5:00 PM, Chema wrote:
>> How I can get  SSO ID on a servlet?
> 
> Get the cookie value for JSESSIONIDSSO.
> 
>> I want to know this ID without browser sends a cookie to server.
> 
> Browser cookies are a requirement to use Tomcat's SSO. Given that, just
> read the cookie out of the request.

Why do you need a consistent ID between the two apps?


p


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