Write a servlet that authenticates a user (based on user names and passwords stored in a database relation) and sets a session variable called userid after authentication.


// TODO.

Servlet version:

 

Flask Version: