We can get values from HTML form using HttpServletRequest. In the example below, request is of type HttpServletRequest.

Java Code:
String userName = request.getParameter("userName");
String userName = request.getParameter("password");
String userName = request.getParameter("location");