Two things:
- You should use
println
instead ofprint
to print your entries to separate lines. - HTTP request should end in a blank line (link). So add
pw.println("");
More Related Contents:
- Does a TCP socket connection have a “keep alive”?
- Why is it impossible, without attempting I/O, to detect that TCP socket was gracefully closed by peer?
- A Simple Http Server with Java/Socket?
- Safe use of HttpURLConnection
- How can I retrieve IP address from HTTP header in Java [duplicate]
- How to modify the header of a HttpUrlConnection
- How to get host name with port from a http or https request
- Send HTTP GET request with header
- Sending and receiving files on socket
- Illegal characters in HTTP headers
- Where is the getInputStream() function in java 1.8?
- How do you Programmatically Download a Webpage in Java
- Java – How to find the redirected url of a url?
- HttpServletRequest to complete URL
- Java swing GUI freezes
- How to terminate a thread blocking on socket IO operation instantly?
- How to allow users to check for the latest app version from inside the app?
- Android HttpPost: how to get the result
- How to make an HTTP get request in C without libcurl?
- How to enable wire logging for a java HttpURLConnection traffic?
- How to handle HTTP OPTIONS with Spring MVC?
- What would cause UDP packets to be dropped when being sent to localhost?
- Do Java sockets support full duplex?
- Can I override the Host header where using java’s HttpUrlConnection class?
- How do I check if a Socket is currently connected in Java? [duplicate]
- how to resume an interrupted download
- Library and examples of parsing multipart/form-data from inputstream
- New java.security.AccessControlException in Java 8
- Using Sockets to send and receive data
- posting XML request in java