Apart from the HTML outputting inside the servlet, I see three major issues, where the third one is the probable cause of your direct issue:
1) You shouldn't ignore the exception in the init method. At least print it, so it will be present in the logs. Or just wrap it in a ServletException so the servlet will fail to initialize.
2) Your code is prone to SQL injection. Use a PreparedStatement instead.
3) Don't compare Strings using == but use the equals method instead. You're comparing for instance equality, and it's very unlikely that the parameter value is exactly the same object.