This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes web server Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "web server" Watch "web server" New topic
Author

web server

mj zammit
Ranch Hand

Joined: Nov 16, 2008
Posts: 49
Hi
I built a web server which outputs HTML.
Now when i run it and call for the HTML on Internet Explorer the HTML is viewed, but when i call on Firefox no HTML is outputted...
why is that???

here is the source code:
package myservertrial1;


Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16487
    
    2

If you install Live HTTP Headers into your Firefox you will see the headers attached to your response. I don't think you meant to write this header:
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8291

Look very closely at the structure of an HTTP response. You are very close.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
mj zammit
Ranch Hand

Joined: Nov 16, 2008
Posts: 49
thank you for both your help.
yes there was no need for placing doctype and i also had to arrange the reply header
thanks again
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24081
    
  15

IN particular, the issue was that you didn't have a blank line after the headers, right?


[Jess in Action][AskingGoodQuestions]
mj zammit
Ranch Hand

Joined: Nov 16, 2008
Posts: 49
Sorry for the late reply
This is the modified reply header
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: web server
 
Similar Threads
outputting html content to the server
What's problem with this SSL Socket??
Java Server, PHP client
Multichat Application
Decompression of strings received from socket connection