tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: xhtml and Internet Explorer
Date Thu, 30 Oct 2003 19:39:20 GMT
> Thanks for all the replies. I did solve the mystery.
> IE is indeed a POS.

I told you :)

> IE seems
> to be scanning for the <html> 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.
> 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

If you have multiple JSP directives at the tops of your pages, consider 
putting them onto the same line. For example:

<%@page import="..." %>
<%@page language="Java" %>
<jsp:include page="foo.jsp" />
<jsp:include page="bar.jsp" />
<jsp:include page="baz.jsp" />

Maybe change this to:

<%@page import="..." %><%@page language="Java" %><jsp:include 
page="foo.jsp" /><jsp:include page="bar.jsp" /><jsp:include 
page="baz.jsp" />

Also note that all of your <%@page ... %> directives can be put together 
into one directive, which uses less space.

Tomcat really can't be blamed, because you are putting the newlines into 
the JSP file yourself. The only thing I can think of would be to have 
Tomcat ignore trailing whitespace on JSP source lines that nothing but a 
JSP directive or something like <jsp:include>...

You other option might be to create a filter that collapsed multiple 
consecutive newlines into a single one. This might break some of your 
page, though.

> A few more observation regarding IE. It seems that
> once it guessed the type of a page it is caching that
> info in memory.

Even better! What version of IE are you using, BTW? I'm wondering if 
they've finally fixed this in IE 6.0. I still use 5.5 when I view a site 
that's so broken in Mozilla that I can't make sense of it (which makes 
me pretty much furious).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message