This tutorial will cover a Http Client server application GET/POST in Java Example. The goal of this tutorial is to create a GUI application that connects to web and shows addition of two numbers. This is tutorial part one for creating the server side application. Part one will cover the web application. Next part will show the GUI creation. and In this tutorial, I am using NetBeans IDE and Glassfish Server. Focus of this application are following:
- Create Web application that can add two numbers
- Create Java application that can take input from webserver
First part is to create Web server application for our client server application. Create a new web application from File > New Project > Java Web and select Web application. Then click Next and type in Project name.
Now Click Next and select Glassfish Server and click finish
You will see that a new web application project have been created. Do a right-click on the project and click on run. You will see that your configured browser have started a localhost link using Glassfish Server. My application is showing http://localhost:8080/ClientServerWeb/ according to above project settings. If the server started and localhost url is showing demo web page, then we are in right track. Next step is to start coding out server side application that can return addition of two number using http.
Continue Reading →
Tags for the article:
- java get post