Client Browser

Hello,

I am writing a WebServer Class and would like browser to be my client...

I am wander how I pass in the "http://xxx.xxx:80/~hello" to the server ...?

Just don't really understand ...

This is what I am writting now ...

int port = 80;

ServerSocket listener =new ServerSocket(port,1);

Socket connection = listener.accept();

My code is wrong I think. I do not know how to establish a connection with browser.

Another question,

how do I compile the code... is it javac *.java and then when executing the server ... is Java Server for example ...

Thanks .. hope you can help me ...

Message was edited by:

BB81

[764 byte] By [BB81a] at [2007-11-26 16:36:28]
# 1
> I am wander how I pass in the> " http://xxx.xxx:80/~hello" to the server ...?You don't, you type it into the browser.> I do not know how to establish a connection with browser. You don't. The browser establishes a connection with your server.
ejpa at 2007-7-8 23:01:26 > top of Java-index,Archived Forums,Socket Programming...
# 2
> how do I compile the code... is it javac *.java and then when executing the server ... is Java Server for example ...I think first of all you should go to "New to Java" forum and ask, but better go and read some kind of book for beginners. Then come again.
Michael.Nazarov@sun.coma at 2007-7-8 23:01:26 > top of Java-index,Archived Forums,Socket Programming...
# 3
i too need this how to communicate client with the server how the request is being passed
javaprogramera at 2007-7-8 23:01:26 > top of Java-index,Archived Forums,Socket Programming...
# 4
Using HTTP protocol: http://www.ietf.org/rfc/rfc2616.txt
beradriana at 2007-7-8 23:01:26 > top of Java-index,Archived Forums,Socket Programming...