Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java : How to receive HTTP get request using java socket programming and generate HTTP response .

 
Singh Harmeet
Ranch Hand
Posts: 115
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am new for java server socket programming . i want to build an small client server application in java . in this application the client is web browser and server is core java program . i am little bit know about command line client program that deal with java server . but with web browser i have no idea.
 
Ulf Dittmer
Rancher
Pie
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While HTTP is a pretty simple protocol in its most basic incarnation, building a browser as a client is very ambitious. Maybe start with the server-side and use an existing browser as the client. That way you don't have to worry whether the client or the server is the problem in case something doesn't work.

I assume you have worked through http://docs.oracle.com/javase/tutorial/networking/index.html, especially the section on "All about Sockets", and gotten the client/server pair discussed there to work. If not, that should be the first step.

After that, read the HTTP specification to learn what an HTTP server needs to accept and respond to.
 
A Miguel
Greenhorn
Posts: 4
Java Mac OS X Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a great primer on HTTP too if you find the spec a bit hard to follow:

http://www.jmarshall.com/easy/http/
 
Singh Harmeet
Ranch Hand
Posts: 115
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks to all .....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic