form based authentication problem

2003-02-04 Thread Ralf Lorenz
guess that was to much of description last time! next try

can anybody tell me how to do some action, say put an object in the session
or/and update a list in the servlet context directly after a user was logged
in successfully via form-based authentication (context) with a jdbc-realm?

ralf



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: form based authentication problem

2003-02-04 Thread Barney Hamish
I did something like that using struts. I wrote a base action class which
all my other action classes extended. The base class performs any
initialization (initializing objects in the session etc) as required.

If you don't want to use struts you might consider using a filter.
Hamish

 -Original Message-
 From: Ralf Lorenz [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 04, 2003 1:13 PM
 To: [EMAIL PROTECTED]
 Subject: form based authentication problem
 
 
 guess that was to much of description last time! next try
 
 can anybody tell me how to do some action, say put an object 
 in the session
 or/and update a list in the servlet context directly after a 
 user was logged
 in successfully via form-based authentication (context) with 
 a jdbc-realm?
 
 ralf
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: form based authentication problem

2003-02-04 Thread Ralf Lorenz
thanks, that's exactly the solution i discussed right now with some other
developers of my company.
the question with the filter is whether it is called when the container
forwards or redirects to the
claimed resource after the authentication is done? theoretically i'd say yes
but who knows?
try and error i guess!
ralf


- Original Message -
From: Barney Hamish [EMAIL PROTECTED]
To: 'Tomcat Users List' [EMAIL PROTECTED]
Sent: Tuesday, February 04, 2003 1:35 PM
Subject: RE: form based authentication problem


 I did something like that using struts. I wrote a base action class which
 all my other action classes extended. The base class performs any
 initialization (initializing objects in the session etc) as required.

 If you don't want to use struts you might consider using a filter.
 Hamish

  -Original Message-
  From: Ralf Lorenz [mailto:[EMAIL PROTECTED]]
  Sent: Tuesday, February 04, 2003 1:13 PM
  To: [EMAIL PROTECTED]
  Subject: form based authentication problem
 
 
  guess that was to much of description last time! next try
 
  can anybody tell me how to do some action, say put an object
  in the session
  or/and update a list in the servlet context directly after a
  user was logged
  in successfully via form-based authentication (context) with
  a jdbc-realm?
 
  ralf
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: form based authentication problem

2003-02-04 Thread Raible, Matt
If you map the filter to the same url-pattern as your protected resource, it
will be called immediately after someone authenticates.

HTH,

Matt

 -Original Message-
 From: Ralf Lorenz [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, February 04, 2003 6:59 AM
 To: Tomcat Users List
 Subject: Re: form based authentication problem
 
 
 thanks, that's exactly the solution i discussed right now 
 with some other
 developers of my company.
 the question with the filter is whether it is called when the 
 container
 forwards or redirects to the
 claimed resource after the authentication is done? 
 theoretically i'd say yes
 but who knows?
 try and error i guess!
 ralf
 
 
 - Original Message -
 From: Barney Hamish [EMAIL PROTECTED]
 To: 'Tomcat Users List' [EMAIL PROTECTED]
 Sent: Tuesday, February 04, 2003 1:35 PM
 Subject: RE: form based authentication problem
 
 
  I did something like that using struts. I wrote a base 
 action class which
  all my other action classes extended. The base class performs any
  initialization (initializing objects in the session etc) as 
 required.
 
  If you don't want to use struts you might consider using a filter.
  Hamish
 
   -Original Message-
   From: Ralf Lorenz [mailto:[EMAIL PROTECTED]]
   Sent: Tuesday, February 04, 2003 1:13 PM
   To: [EMAIL PROTECTED]
   Subject: form based authentication problem
  
  
   guess that was to much of description last time! next try
  
   can anybody tell me how to do some action, say put an object
   in the session
   or/and update a list in the servlet context directly after a
   user was logged
   in successfully via form-based authentication (context) with
   a jdbc-realm?
  
   ralf
  
  
  
   
 -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: 
 [EMAIL PROTECTED]
  
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Form Based authentication problem

2001-09-27 Thread Miguel Angel Medina Lopez

Hi all:

I'm working with Tomcat 3.2.3 and postgres 7.0. I want to use form-based
authentication and i have included the next lines in the server.xml file:
RequestInterceptor
className=org.apache.tomcat.request.JDBCRealm
debug=0
driverName=org.postgresql.Driver
connectionURL=jdbc:postgresql://192.168.0.17/tomcat_users
connectionName=tomcat
connectionPassword=tomcat
userTable=usuarios
userNameCol=login
userCredCol=password
userRoleTable=usuarios
roleNameCol=role /

The connection to the db is opened succesfully but when I put a valid
username and password the query doesn't work. The error in the tomcat.log
file is:
JDBCRealm: The database connection is null or was found to be closed.
Trying to re-open it.

and the user isn't authenticated.

Thank you all

-
Miguel Ángel Medina López
Logic Factory: www.logic-factory.com
Granada - España






Re: Form Based authentication problem

2001-09-27 Thread Kaneda K

This might be (I had a probleme that look the same with Mysql)
so this might be that it need to be autoReconnect=true:

  connectionURL=jdbc:postgresql://192.168.0.17/tomcat_users

became :
  connectionURL=jdbc:postgresql://192.168.0.17/tomcat_users?autoReconnect=true

Try and give me your feed back, please.

At 09:32 27/09/2001 +0200, you wrote:
Hi all:

I'm working with Tomcat 3.2.3 and postgres 7.0. I want to use form-based
authentication and i have included the next lines in the server.xml file:
 RequestInterceptor
 className=org.apache.tomcat.request.JDBCRealm
 debug=0
 driverName=org.postgresql.Driver
 connectionURL=jdbc:postgresql://192.168.0.17/tomcat_users
 connectionName=tomcat
 connectionPassword=tomcat
 userTable=usuarios
 userNameCol=login
 userCredCol=password
 userRoleTable=usuarios
 roleNameCol=role /

The connection to the db is opened succesfully but when I put a valid
username and password the query doesn't work. The error in the tomcat.log
file is:
 JDBCRealm: The database connection is null or was found to be closed.
Trying to re-open it.

and the user isn't authenticated.

Thank you all

-
Miguel Ángel Medina López
Logic Factory: www.logic-factory.com
Granada - España




Re: Form Based authentication problem

2001-09-27 Thread Miguel Angel Medina Lopez

Hi:

Thanks Kaneda but the parameter autoReconnect doesn't work in Postgres.
I have found the error in the server.xml file and now I can't authenticate
fine. Now the problem is that I need the user name in differents context.
How can I do that? How can I keep client state in different contexts?

Miguel Ángel Medina López


- Original Message -
From: Kaneda K [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, September 27, 2001 10:01 AM
Subject: Re: Form Based authentication problem


 This might be (I had a probleme that look the same with Mysql)
 so this might be that it need to be autoReconnect=true:

   connectionURL=jdbc:postgresql://192.168.0.17/tomcat_users

 became :

connectionURL=jdbc:postgresql://192.168.0.17/tomcat_users?autoReconnect=tru
e

 Try and give me your feed back, please.

 At 09:32 27/09/2001 +0200, you wrote:
 Hi all:
 
 I'm working with Tomcat 3.2.3 and postgres 7.0. I want to use form-based
 authentication and i have included the next lines in the server.xml file:
  RequestInterceptor
  className=org.apache.tomcat.request.JDBCRealm
  debug=0
  driverName=org.postgresql.Driver
  connectionURL=jdbc:postgresql://192.168.0.17/tomcat_users
  connectionName=tomcat
  connectionPassword=tomcat
  userTable=usuarios
  userNameCol=login
  userCredCol=password
  userRoleTable=usuarios
  roleNameCol=role /
 
 The connection to the db is opened succesfully but when I put a valid
 username and password the query doesn't work. The error in the tomcat.log
 file is:
  JDBCRealm: The database connection is null or was found to be
closed.
 Trying to re-open it.
 
 and the user isn't authenticated.
 
 Thank you all
 
 -
 Miguel Ángel Medina López
 Logic Factory: www.logic-factory.com
 Granada - España