users@glassfish.java.net

Re: SSI not rendered in Firefox but works in IE.

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Mon, 29 Oct 2007 15:08:14 -0400

Hi,

glassfish_at_javadesktop.org wrote:
> Folks,
>
> I have a simple need to serve .shtml files by glassfish. I have followed the instructions per Jean-Francois Arcand's Blog http://weblogs.java.net/blog/jfarcand/archive/2007/02/enabling_server_1.html.
>
> The .shtml page is displayed correctly in IE but in Firefox, the firefox prompts to save the file. There is some configuration that is missing in Glassfish that is causing firefox to interpret in a way that it thinks it is not text content. It works ok in IE because IE is little bit more forgiving when it comes to standards. My *.shtml file is very simple:
> ====
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <meta http-equiv="refresh" content="0;url=/index.jsp">
> <meta name="robots" content="noindex,nofollow">
> <title>FOLIOfn</title>
> <script language=javascript>
> <!--
> if (top == self) location.replace('/index.jsp');
> //-->
> </script>
> </head>
> <body>
> </body>
> </html>
> ====
>
> It is simple rewrite. I have a little more complex shtml with some include directives and no rewrite, I get identical results, works in IE but asks to save file in Firefox.
>
> Any ideas?

Not sure at all so I might be wrong but if Firefox thinks it is a
binary/unknown type, it can probably means the content-type is not
known. if you add it under Preferences > Content > 'Configure how
Firefox handles certain types of files > <<add your MIME>>, does it
makes adifference


  I am thinking some configuration is missing in Glassfish. I have
checked and verified that SSI servlet is configured and is called since
I single stepped into the SSIServlet via debuger, the response stream
looks ok.
>
> Verified that the MIME type is text/x-server-parsed-html.

Just to make sure, it's the server response you looked at, right? Can
you dump the response the browser is getting? Depending on the platform
you are running on, you can either install FindBug in Firefox to see
what the response looks like, or install ngrep
(http://ngrep.sourceforge.net/)

% ngrep -d en0 -q -W byline port 8080

Much more easy to use than Wireshark (another sniffer).

Thanks,

-- Jeanfrancois


> --
> Sanjay
> [Message sent by forum member 'sanjaydwivedi' (sanjaydwivedi)]
>
> http://forums.java.net/jive/thread.jspa?messageID=242739
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>