In my login page I log in through username and password (that I get from a jsp page), then I check LDAP and if the credentials are correct, then I continue the browsing to other pages.
I would like to store somewhere username and password, because in some next pages, I may need them to make other stuff.
I was thinking to store them in the session, but I'm scared that this can bring to security issue. Am I wrong? Maybe is it better to store them in the DB and query the DB the every times that I need them, and storing in the session just an ID that point to a DB record? (this could be ok, but maybe exist faster and better ways)
Which is the best way to store them from action to action?