This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma 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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Sockets and Internet Protocols
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
Sheriff

Joined: Oct 14, 2005
Posts: 19727
    
  10

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: 9137
    
    9

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
Marshal

Joined: Jul 08, 2003
Posts: 24189
    
  34

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: web server
 
It's not a secret anymore!