February 21st, 2003, 07:48 PM
Netscape/JSP Page Problem
When on the internet, I am having a problem getting to my own JSP page in both Netscape 4.7 and Netscape 6 but have no difficulty at all with Internet Explorer.
(Netscape works fine on my laptop). Essentially, when I type in an address (for my own website) with a JSP extension, I get a message from Netscape that I am trying to download the file and it asks me whether I want it opened or saved. However, using Netscape I am able to get to other internet addresses with a jsp extension.
Of course, I am not trying to download anything. I am simply trying to get to the page. When I type in
Netscape takes me to that page. However, when I click on any buttons or menus that should be bringing me to a JSP page, again Netscape gives me a message about downloading the page.
Is there something that I need to do in my code? At the present time, I am not using compiled code (class files). The JSP is simply an HTML page with a JSP extension.
Thanks for any help you can offer,
February 22nd, 2003, 04:44 PM
It is unlikely this is a jsp issue. More likely it is a web server issue. Generally speaking, if a web server is sending out a mime type that the browser does not understand it asks you what you want to do with the file. This is likely what Netscape is doing. IE works a little different. When IE receives a file it first ignores the extension and sees if it is a properly formed html file. If it is, it goes ahead and displays it as a web page. You can test this by changing the extensions of an html file to .txt. Netscape will display the html as text in the browser. IE will not. It still renders it as an html page. I am sure they consider this a 'feature', though it does cause problems when IE does this sometimes.
The default mime type sent out from jsp's should be "text/html;charset=ISO-8859-1". However, you could try explicitly setting it to that using:
and see what it does. If that doesnt work, then the web server itself may be overwriting the mime type sentout by the jsp with an unknown mime type. Hope this helps.
<%@ page contentType="text/html; charset=ISO-8859-1" %>
February 25th, 2003, 02:53 PM
You're right on target. I notified my web host and they corrected the problem. By the way, you're the only person out of several forums and personal contacts who knew the answer.
Thank you so much,