Marius Scurtescu wrote: > Thanks for all the replies. I did solve the mystery. > IE is indeed a POS. > > It looks like it completely ignores the Content-Type > headers and it just scans the beginning of the file. You know what's great about that? It's not a bug, it's a feature. http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/moniker/overview/appendix_a.asp Internet Explorer BY DESIGN ignores the content-type and decides for itself what to do with the file. Their reasoning? "this type of behavior is necessary to identify a .gif file being sent as text/html" *shakes head* Good luck with the newline issue; sorry I don't have any advice to offer :) Bean > > The JSPs I was struggling with are using lots of JSP > directives (tag lib and page), includes and tiles. > The result was that there were many empty lines after > the DOCTYPE declaration and the tag. IE seems > to be scanning for the tag (don't ask why) and > if it does not find it soon enough then it gives up > and treats the file as raw XML. Pretty smart. > > I attached a test file which on my system is treated > as raw XML. If I delete on single empty line before > the tag then it is treated as XHTML. > > Now this is sort of a show stopper for me, unless I > find a way to reduce the empty lines a the top of > a file. Is there a way in Tomcat to prevent the > creation of an empty line for each JSP directive? > I cannot move the tag on top since it is > generated in a layout file and imported through > tiles. > > A few more observation regarding IE. It seems that > one it guessed the type of a page it is caching that > info in memory. Deleting temporary files and forcing > a check on every visit does not help. You have to > close the browser in order to flush this cache. > Loading pages from the file system has a completely > different logic, it is based on the file extension > (there is no scanning for tag). > > Thanks again, > Marius > > Carlos Pereira wrote: > >>> That's because IE ignores the Content-Type header and just looks at the >>> first few bytes of the file to decide how to display it. What a POS. >>> Anyway... >> >> >> (Christopher Schultz) >> >> IE works like this: in the first call to a web page, it checks the >> Content-Type and displays the web page accordingly. Next time you request >> the same page, it ignores the Content-Type. >> >> >>>> I know that this issue came up before on this >>>> list, but the solution suggested previously >>>> (adding a page directive with the content type) >>>> does not work. >> >> >> (Marius Scurtescu) >> >> So, do the following: >> 1. You have to make sure IE is foing to display the most recent page. You >> can do this by either adding a pragma/no-cache header, or go to (in IE): >> tools/internet options/temporary internet files/settings and, under >> "check >> for newer versions of stored pages", select the "every visit to the page" >> option. When you are developing, this last thing should ALWAYS be done. >> Otherwise, you might be getting IE cached versions of the web page and >> asking yourself why the changes aren't working. >> 2. Force IE to read the Content-Type again. Simply shut down the browser, >> and request your xhtml page to see if it works. >> >> Hope that helps. >> Carlos Pereira > > > > ------------------------------------------------------------------------ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org