You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Manuel Lenz <Lz...@Viessmann.com> on 2004/01/27 09:14:53 UTC

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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: WebGroups & css

Posted by Michael McGrady <mi...@michaelmcgrady.com>.
I upload all resources (CSS, GIFs, JPEGs, SWFs, etc.) with an action class 
to avoid all these maddening URL problems caused by the differing 
perspectives of the client and server.  If you get away from the URL 
solution, and use the .do solution, then URLs are no longer an issue.  If 
you look at the source code for the opening page at www.michaelmcgrady.com, 
you can see how this works. The code on that page for the CSS is:

<LINK href="RESOURCE.MICHAELMcGRADY?file_type=css&file_name=css_welcome.css"
                   type=text/css rel=stylesheet>

This avoids all URL issues because that protocol is abandoned 
completely.  If you are interested in how to do this, just let me know and 
I will send you the classes.  It is pretty simple.

At 12:14 AM 1/27/2004, Manuel Lenz wrote:





>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: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: WebGroups & css

Posted by Andrew Hill <an...@gridnode.com>.
Try using an <html:base tag in your jsp. (See the docs for details , I
forget the syntax)

-----Original Message-----
From: Manuel Lenz [mailto:LzM@Viessmann.com]
Sent: Tuesday, 27 January 2004 16:15
To: Struts Users Mailing List
Subject: 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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org