Url Shortener writter in Java with Servlet/JSP