tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Mixon (qwest)" <rnmi...@qwest.net>
Subject RE: JDBC
Date Mon, 28 Feb 2005 00:13:22 GMT
Sounds like you need application logic to do this - probably in
conjunction with using Tomcat's Container Managed Authentication (CMA).

Tomcat can validate the username against a database (see JDBCRealm at
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/realm-howto.html#JDBCRea
lm ).

However after being authenticated you can issue
  request.getRemoteUser();
to determine which user logged in. Then you can control how their
database queries are issued.

HTH - Richard

deepak suldhal wrote:
> Hi,
>   This does not solved the problem, with this I can
> restrict access to user group or allow access.
>
> Once the user has access I need to know who he or she
> is so that I can query the database with respect to
> his or her user_id.
>
> And So how would I do this.
>
> Thanks
> D
> --- Hiroshi Iwatani <HGA03630@nifty.ne.jp> wrote:
>
>> Write <tomcat-users> element in the tomcat-users.xml file.
>>
>> deepak suldhal wrote:
>>> Hi,
>>>    I followed the JDBC document posted on Tomcat site.
>>> and it works fine. I am able to access the database and see the
>>> results.
>>>
>>> My question is.
>>>
>>> I have different users who will be using my
>>> application
>>> and I need to validate these users before I provide them acesss to
>>> database.
>>>
>>> How would I do this ?. Since tomcat has the user name
>>> and password already in the context, How would know which user is
>>> accessing.
>>>
>>> Thanks
>>> D
>>>
>>>
>>>
>>>
>>>
>>> __________________________________
>>> Do you Yahoo!?
>>> Yahoo! Mail - You care about security. So do we.
>>> http://promotions.yahoo.com/new_mail
>>>
>>>
>>
> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail:
>> tomcat-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail:
>> tomcat-user-help@jakarta.apache.org
>>>
>>>
>>
>> --
>> Hiroshi Iwatani
>>
>> *stop cruelty* Annual number of institutionally
>> euthanized cats and dogs
>> including kittens and puppies: US 5 million, JP 500 thousand. How
>> about your country? *for our better karma*
>> ---------------------
>>
>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail:
>> tomcat-user-help@jakarta.apache.org
>>
>>
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - You care about security. So do we.
> http://promotions.yahoo.com/new_mail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message