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 <[EMAIL PROTECTED]> 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: >> [EMAIL PROTECTED] >>> For additional commands, e-mail: >> [EMAIL PROTECTED] >>> >>> >> >> -- >> 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: >> [EMAIL PROTECTED] >> For additional commands, e-mail: >> [EMAIL PROTECTED] >> >> > > > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - You care about security. So do we. > http://promotions.yahoo.com/new_mail > > --------------------------------------------------------------------- > 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]