URLConnection has a method #setRequestProperty(?, ?). You can use it to send the parameter from Java Application(Client) to the Servlet(Server). I suggest you look into the examples in Java Servlets by Karl Moss (it is a red cover book, published by mcGraw Hill). See pages 93--99. You can find the book in most bookstore. For the example code, you can download it from www.servletguru.com. I do believe I have helped you because you do not use the browser as the client. So you need to work at a lower level than doGet and doPost. Good luck, my pal.