I'm trying to connect my web application and pages to a db2 database on a unix system.
Right now i can connect using
JDBC, my username, password and so on after loggin on using j_security_check.
But it's accessing tomcat-users.xml or whatever.. That's great and all and it works, but I need a way for the database connection to relate to the user's who sign in or not, not by my database connection and authentication.
Some users have access to the DB, while others might not...
I have to figure out a way where after a User signs into the secure part of the website, those username and passwords get stored or are used for the JDBC connection when they click on a table or report that needs to get info or store info in the DB2 Database.
Right now I hardcoded my user name, password and so on in the JDBC connection just to get it to work. I get reports back, can update things and so on. I was playing around with JNDI, but since I'm not the server admin and they haven't always been "tech" or helpful, i'm not sure if that's the best option.
But I need a way for the usernames and passwords to somehow be used as the "username" and "password" part of the jdbc connection. Instead of my username and password.
thanks.