I noticed that servlets encode the session data to the URL (visible) when cookies are disabled. Doesn't this open the possibilities for attacks when someone is snooping on the traffic in the network ? Also, why isn't it added to data part and sent as a post request, so that https can be used to provide the security ?
I'm currently creating a session when the log in is successful and am storing the user id in the session and the combination of the user id and session id in the db. For every action, i'm validating the session id and user id and session id provided to the one stored in the db. Is this a correct approach ?