Revamped servlet to connect to database and echo data