Thanks for the reply Marvin. Yes, you were right, the .application.layout page
does insert a DOCTYPE.
We'll try to find a workaround for this -- we need dynamic substitution of the
right tile definition, based on certain conditions, as below; we need to switch
between .application.layoutand .single.layout, so we were hoping this would
work:
<c:set var="layoutDef" value="application"/>
<c:if test="${!currentComplexApplication.complex}">
<c:set var="layoutDef" value="single"/>
</c:if>
<tiles:insert definition=".${layoutDef}.layout">
But because of the DOCTYPE we get the IE8 rendering issue. We'll try to find a
workaround but I may post here again if we have any further issues/questions.
Thanks a lot for your help!
- Eugene
________________________________
From: "[email protected]" <[email protected]>
To: [email protected]
Sent: Wednesday, August 20, 2014 11:23 AM
Subject: AW: Problem with Tiles:Insert Tag in IE 8
Hi Eugene,
Sounds like ".application.layout" inserts a DOCTYPE declaration into your HTML
document. This DOCTYPE controls the browser's rendering mode and it has to be
the very first content of your HTML code (I think even spaces or line breaks
prevent the browser from recognizing the DOCTYPE).
" When the user agent encountered a document with a well-formed DOCTYPE
declaration of a current HTML standard (i.e. HTML 2.0 wouldn't cut it), it
would assume that the author knew what she was doing and render the page in
"standards" mode (laying out elements using the W3C's box model). But when no
DOCTYPE or a malformed DOCTYPE was encountered, the document would be rendered
in "quirks" mode, i.e., laying out elements using the non-standard box model of
IE5.x/Windows."
http://alistapart.com/article/beyonddoctype
In Quirks mode the Internet Explorer may render your document, especially CSS,
quite differently.
If this is not the cause of your problem, examples of your generated HTML in
both cases would be helpful.
Best regards,
Marvin Luchs
-----Ursprüngliche Nachricht-----
Von: Eugene Borodkin [mailto:[email protected]]
Gesendet: Mittwoch, 20. August 2014 17:16
An: [email protected]
Betreff: Problem with Tiles:Insert Tag in IE 8
Hi,
We have an issue on our JSP which uses Tiles,only in IE 8(Firefox is fine).
The JSP begins with standard imports (incl. the Tiles library), and the first
tag on the page is:
<tiles:insert definition=".application.layout">
This works and renders the page correctly. However, adding anything prior to
this tag breaks the layout in IE8 (even a single comment). Some kind of weird
issues occur (maybe CSS-related) as soon as we try the below, which should be
identical to this first tag. Does anyone have any thoughts?
(1): Should be identical
<c:setvar="layoutDef"
value="application"/><tiles:insertdefinition=".${layoutDef}.layout">
(2): Should be identical (comment)
<!-- TEST -->
<tiles:insertdefinition=".application.layout">
The above two break our page layout and render it incorrectly only in IE8.
Firefox has no issues.
Thanks for any help,
- Eugene Borodkin