The best choice is to use html:rewrite :)
i m with james

----- Original Message -----
From: "James Mitchell" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, January 27, 2004 1:06 PM
Subject: Re: WebGroups & css


> I've found this to be the cleanest way (aside from using a custom tag):
>
> <head>
> ...
> ...
>  <style type="text/css" media="screen">
>   @import url(<html:rewrite page="/stylesheets/style.css" />);
>  </style>
> </head>
>
>
> The benefits here are:
>     * The URL is relative to the root of the server.
>       An application named "myapp" will resolve to
>       /myapp/stylesheets/style.css.  So this will
>       work from anywhere in the application, no
>       matter what the address bar shows.
>
>     * no scriplet
>
>     * no nested xml-like syntax
>
>
> ...anyway...just my $.02
>
>
> --
> James Mitchell
> Software Engineer / Struts Evangelist
> http://www.struts-atlanta.org
> 678.910.8017 (cell)
> AIM: jmitchtx
> MSN: [EMAIL PROTECTED]
>
>
>
> ----- Original Message -----
> From: "Otto, Frank" <[EMAIL PROTECTED]>
> To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
> Sent: Tuesday, January 27, 2004 5:10 AM
> Subject: AW: WebGroups & css
>
>
> > Hi,
> >
> > you can do this in this way (static path to css file):
> >
> > <%
> > String context_path = request.getContextPath();
> > %>
> >
> > <LINK href="<%=context_path%>/theme/formats.css" rel="stylesheet"
> type="text/css">
> >
> >
> > Regards,
> >
> > Frank
> >
> > -----Ursprungliche Nachricht-----
> > Von: Manuel Lenz [mailto:[EMAIL PROTECTED]
> > Gesendet: Dienstag, 27. Januar 2004 09:15
> > An: Struts Users Mailing List
> > Betreff: WebGroups & css
> >
> >
> >
> >
> >
> >
> >
> > Hi you,
> > I do have a silly problem with style sheets-linking.
> >
> > I have a css-File in the folder "/theme/formats.css".
> >
> > I access this file from a jsp-page of the folder "/help/info.jsp" with
> this
> > link:
> > <LINK href="../theme/formats.css" rel="stylesheet" type="text/css">
> > This works, if I call the jsp-Page directly.
> >
> > There is another jsp-page in the folder called "/help/infoTest.jsp".
> > This page is called from struts-config with a forward.
> > The page has exactly the same code for linking the css-File.
> > But when the jsp-Page is called, the css-File is not found and the
server
> > is
> > showing this message:
> >
> > "Web group /theme/formats.css is not defined"
> > ("Die Webgruppe /theme/formats.css wurde nicht definiert.")
> >
> > Does anybody have an idea how to solve this problem?
> >
> > Manuel
> >
> >
> > ---------------------------------------------------------------------
> > 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]
>
>
> ---------------------------------------------------------------------
> 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