Why are u using the HttpUrlConnection and HttpClient interfaces ?
The best way to implement what u want is thru HttpServletRequest and HttpServletResponse interfaces.
Make sure to import the javax.servlet.http.* package.
Go thru it's documentation also. It's quite easy. U can simply use the request.getParameter("parameter_name") method in the servlet's doGet() method.
Hope this helps !!