[Java] Running A Basic Web Server
Hi There;
There is a java class that implements basic web server.It gets the port number from console. This code is very basic, it returns what the client sends.Here are the codes: Code:
package p106; What is the problem, how can I solve it?How can that class work? Thanks in advance. |
This program works as written. All it does is return the exact information passed to it. Since you are simply going to http://localhost:4444, there is nothing to return. If you add a breakpoint at the Socket call, you'll see that it is opening the socket and reading the http header and echoing that back to the browser.
What are you expecting from the program? |
I expect program to show requests in which the clients sends. The modificated and corrected version is there:
The problem was solved in: http://forum.ceviz.net/java-jsp-jsf/...tml#post696442 Quote:
|
Can't read the language, but based on the program it looks like it is creating a proper http header for the browser for which to display the original request.
|
All times are GMT -5. The time now is 01:57 PM. |