Yeah there is a cost..

in which case i'd get the context path and use that, but makes moving a template into the app a little more work.

Mark

On 30 Jul 2004, at 11:57, Nicolas De Loof wrote:


Having this, you need all your action path to have same number of directory levels, so that ../.. points to the
application context root.


We use modules and structured path with up to 3 levels, so using <html:rewrite> is usefull to assume URI to static
resources (css or images) are valid.


Nico.


We tend to use relative paths to css and other static resources.

@import url("../../style/main.css");

1. Because the session id isn't appended to the path
2. Because static html layouts can be developed separately to the rest
of the app.

As tiles let you use just 1 or a few templates/layouts for many views,
the maintenance is already manageable.

Mark

On 30 Jul 2004, at 11:35, Nicolas De Loof wrote:


Hi all,

just solved a strange problem and would like to share with you if you
have some suggestions :

My app needs to support IE 5.0 :(
 We use CSS and I had designed my baseLayout.jsp like this :

    <style type="text/css">
    <!--
    @import url("<html:rewrite page="/style/main.css" />");
    -->
    </style>

It works fine with IE5.5, IE6 & Mozilla/Firefox
On first request, tomcat adds a ;jsessionid=XXXX to the css URI. IE5.0
doesn't accept such an URI in the @import CSS
directive.
I changed baseLayout.jsp to :


    <link rel="stylesheet" type="text/css" href="<html:rewrite
page="/style/main.css" />"/>

Now it works on every tested browser. I prefered the CSS @import to
avoid nesting JSP tags into HTML tags. I'd like my
JSP source to look XML compliant as possible XML for beeing lisible
and good example for new JSP developers.

Do you have any suggestion for such case ?

Hope it may help if anyone has such troubles with old IE.

Nico.



Our name has changed.  Please update your address book to the
following format: "[EMAIL PROTECTED]".

This message contains information that may be privileged or
confidential and is the property of the Capgemini Group. It is
intended only for the person to whom it is addressed. If you are not
the intended recipient, you are not authorized to read, print,
retain, copy, disseminate, distribute, or use this message or any
part thereof. If you receive this message in error, please notify the
sender immediately and delete all copies of this message.



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Our name has changed. Please update your address book to the following format: "[EMAIL PROTECTED]".


This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to