Re: Using tabbed browsers causes session sharing

2008-08-15 Thread Robert Dietrick
This is normal behavior. Sessions are tied to cookies bound to an
entire domain.  Why would you want the same person logged in twice
with different accounts?

On 8/15/08, murthy gandikota [EMAIL PROTECTED] wrote:
 Hello All
 While using tabbed browsers (e.g. IE 7) I am facing a login problem. Say on
 Tab#1 I login with a username A, on Tab#2 I login with username B, I still
 see A's session. Apparently the browser/Tomcat doesn't create a new session.
 Has anyone faced this problem? Are there any fixes?
 Thanks
 Murthy




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Using tabbed browsers causes session sharing

2008-08-15 Thread Robert Dietrick
That's an acceptable way to deal with the problem (it's not a tomcat
problem after all but an abnormal use case). Anyone who's built an
administrative web app is accustomed to such shenanigans. If you have
a legitimate need to access different parts of your app while logged
in under one account, then you should implement some notion of roles.

On 8/15/08, Bill Davidson [EMAIL PROTECTED] wrote:
 Robert Dietrick wrote:
 Why would you want the same person logged in twice
 with different accounts?


 As a developer of a web app that has both admin and regular user roles,
 I want to do this all the time.  The admin roles can change things in ways
 that affect the regular user's view.  I want to see how things change
 without having to log out and log back in as a different user.

 The way I deal with it is to use Firefox for one and IE for the other.



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



where to place context configuration

2008-08-14 Thread Robert Dietrick
Hi,

I just noticed that I had a Context definition in both
$CATALINA_HOME/conf/Catalina/localhost/mywebapp.xml and in
$CATALINA_HOME/webapps/mywebapp.war/META-INF/context.xml.  In both of
these context definitions, I define a JNDI database connection pool
with the same name and identical parameters.  This was working fine,
but it is confusing, redundant, and runs contrary to the
recommendations in the official documentation.

However, if i remove either one of these files, I get the dreaded
Cannot create JDBC driver of class '' for connect URL 'null' error.
Can anyone offer any advice?  None of the recommended solutions seem
to work.

Thanks.

-rob

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: where to place context configuration

2008-08-14 Thread Robert Dietrick
I would very much prefer to use only the one in
mywebapp/META-INF/contex.xml, as this is much less invasive (does not
require changing/adding anything to tomcat's global config
directories).  But this doesn't seem to work.

I can leave it as is (and am becoming resigned to the fact that this
is my only option), but this is sort of a maintenance nightmare since
the two files need to be kept in sync.  Plus, it just seems idiotic to
need to declare the context and its resources in two locations.

Does either of these files need a 'docBase' or 'path' parameter?  It
doesn't seem to make a difference either way.

-rob

On Thu, Aug 14, 2008 at 11:00 AM, Mark Thomas [EMAIL PROTECTED] wrote:
 Robert Dietrick wrote:
 Hi,

 I just noticed that I had a Context definition in both
 $CATALINA_HOME/conf/Catalina/localhost/mywebapp.xml and in
 $CATALINA_HOME/webapps/mywebapp.war/META-INF/context.xml.  In both of
 these context definitions, I define a JNDI database connection pool
 with the same name and identical parameters.  This was working fine,
 but it is confusing, redundant, and runs contrary to the
 recommendations in the official documentation.

 However, if i remove either one of these files, I get the dreaded
 Cannot create JDBC driver of class '' for connect URL 'null' error.
 Can anyone offer any advice?

 Just leave it as is?

 The one in conf will take priority.

 Mark


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: where to place context configuration

2008-08-14 Thread Robert Dietrick
You are definitely not alone, Angus.  For the record, I'm using Tomcat 5.5.

-rob

On Thu, Aug 14, 2008 at 11:30 AM, Angus Mezick
[EMAIL PROTECTED] wrote:
 Am I the only one that is REALLY disturbed about that idea of REQUIRING
 two identical files to run an app?  One in the war file and one in the
 conf directory?  If the only in the conf directory takes priority, why
 the one in the war file needed at all?  I am just hoping this isn't in
 tomcat 6.0..  The idea of relying on the server to use the correct
 version of possibly different files in a production server makes me VERY
 nervous.

 --Angus Mezick

 -Original Message-
 From: Robert Dietrick [mailto:[EMAIL PROTECTED]
 Sent: Thursday, August 14, 2008 2:22 PM
 To: Tomcat Users List
 Subject: Re: where to place context configuration

 I would very much prefer to use only the one in
 mywebapp/META-INF/contex.xml, as this is much less invasive (does not
 require changing/adding anything to tomcat's global config
 directories).  But this doesn't seem to work.

 I can leave it as is (and am becoming resigned to the fact that this
 is my only option), but this is sort of a maintenance nightmare since
 the two files need to be kept in sync.  Plus, it just seems idiotic to
 need to declare the context and its resources in two locations.

 Does either of these files need a 'docBase' or 'path' parameter?  It
 doesn't seem to make a difference either way.

 -rob

 On Thu, Aug 14, 2008 at 11:00 AM, Mark Thomas [EMAIL PROTECTED] wrote:
 Robert Dietrick wrote:
 Hi,

 I just noticed that I had a Context definition in both
 $CATALINA_HOME/conf/Catalina/localhost/mywebapp.xml and in
 $CATALINA_HOME/webapps/mywebapp.war/META-INF/context.xml.  In both of
 these context definitions, I define a JNDI database connection pool
 with the same name and identical parameters.  This was working fine,
 but it is confusing, redundant, and runs contrary to the
 recommendations in the official documentation.

 However, if i remove either one of these files, I get the dreaded
 Cannot create JDBC driver of class '' for connect URL 'null' error.
 Can anyone offer any advice?

 Just leave it as is?

 The one in conf will take priority.

 Mark


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: where to place context configuration

2008-08-14 Thread Robert Dietrick
On Thu, Aug 14, 2008 at 11:52 AM, Caldarale, Charles R
[EMAIL PROTECTED] wrote:
 From: Robert Dietrick [mailto:[EMAIL PROTECTED]
 Subject: Re: where to place context configuration

 I would very much prefer to use only the one in
 mywebapp/META-INF/contex.xml

 I hope the above is a typo, because if it's really in contex.xml Tomcat 
 won't look at it.

Yes, it was a typo.


 But this doesn't seem to work.

 It works fine for me; I put the Context element in one location or the 
 other, not both.  Note that Tomcat will sometimes copy the one from 
 META-INF/context.xml into conf/Catalina/[host]/[appName].xml during a 
 deployment, and that's likely what you're seeing.

 Plus, it just seems idiotic to need to declare the context
 and its resources in two locations.

 Never had to do that.  Suggest that you stop Tomcat, remove the one in 
 conf/Catalina/[host], clean out the work directory for the webapp, clean out 
 the expanded webapp so all you have left is the .war file, and restart 
 Tomcat.  You will likely see the one in conf/Catalina/[host] recreated from 
 the META-INF/context.xml, since Tomcat wants to be able to read the file 
 directly.  A real undeployment of the webapp should delete the one in 
 conf/Catalina/[host]; if you're updating the .war without doing an 
 undeployment first, you're breaking the rules, and all bets are off.

That did it.  I've never seen it documented anywhere that tomcat
copies context files from META-INF/ to /conf/[Engine]/[host]/.  Plus,
I was deploying as a directory named '[myapp].war' rather than as an
actual .war file, so I guess I get what I deserve.

Thanks for the help.

-rob

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]