File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Sockets and Internet Protocols and the fly likes web server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "web server" Watch "web server" New topic

web server

mj zammit
Ranch Hand

Joined: Nov 16, 2008
Posts: 49
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

Joined: Oct 14, 2005
Posts: 19873

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

Joined: Oct 29, 2001
Posts: 9168

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

[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

Joined: Jul 08, 2003
Posts: 24195

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:
subject: web server
It's not a secret anymore!