My application uses a login dialog to verify username and password for the user. The problem is that I don't want the user to know the username and password to access the db. The login should just seperate the different users from a user table. And at the same time it can't be secure to hardcode the username and password in the app either. So how can I solve it? I'm pretty shure the only solution will be to use a servlet. But my experience with Java is limited and I have never used servlets so some expert guidance(and perhaps some code) would be highly appreciated.