Hi all,
I have made a web application with JSPs. It seems to work fine with IE.
However, with Mozilla and Firefox, it displays the HTML source
generated by JSP instead of actually showing the HTML page for that
source.
I'm stumped because I haven't found any other msgs on forums with
someone experiencing the same problem. Any help would be appreciated. I
need to fix this urgently.
Thanks
regards
Duke
P.S. It was suggested by someone on another forum that I should check
</head> tag. I have already done that and the HTML code is error free
(or so it seems).
hiwa - 28 Oct 2006 10:02 GMT
> Hi all,
>
[quoted text clipped - 15 lines]
> </head> tag. I have already done that and the HTML code is error free
> (or so it seems).
Check your generated HTML at:
http://validator.w3.org/
http://www.htmlhelp.com/tools/validator/
Sean - 28 Oct 2006 11:50 GMT
thanx a lot guys. It's working now.
> > Hi all,
> >
[quoted text clipped - 18 lines]
> http://validator.w3.org/
> http://www.htmlhelp.com/tools/validator/
Chris Uppal - 28 Oct 2006 11:27 GMT
> I have made a web application with JSPs. It seems to work fine with IE.
> However, with Mozilla and Firefox, it displays the HTML source
> generated by JSP instead of actually showing the HTML page for that
> source.
Sounds as if your server isn't telling the browser that it's sending HTML back.
IE will (wrongly[*]) guess it is HTML based on the "filename" extension; real
browsers tend to believe what the server has told them. So if you are not
sending an HTTP header:
Content-Type: text/html
then that is almost certainly the cause of the problem (if you /are/ sending it
then just ignore this post ;-)
NB: that's an HTTP header, not to be confused with HTML <header> tags.
-- chris
[*] It shouldn't guess, but it does anyway...