Thanks for the reply,

This is a lot helpful, and I also found that DispatcherFilter takes an
init-param called " packages" to include in static resources loading if and
only if StrutsConstants.STRUTS_SERVE_STATIC_BROWSER_CACHE property is set to
true.

Thanx again, 

Ramez



-----Original Message-----
From: Musachy Barroso [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 18, 2008 4:11 PM
To: Struts Users Mailing List
Subject: Re: Static Content Loading in Struts 2

If you are building from trunk,

"To include static resources in your plugins add them under "/static"
in your jar. And include them in your page using "/static" as the
path, like in the following example:

Assuming /static/main.css is inside a plugin jar, to add it to the page:

<@s.url value="/static/main.css" var="css" />
<link rel="stylesheet" type="text/css" href="%{#css}" />"

If your are using 2.0, there is a "hack" for it, you can put your
resources inside the jars under the dir:

org/apache/struts2/static/main.css

and then use "/struts" as the path:

<@s.url value="/struts/main.css" var="css" />
<link rel="stylesheet" type="text/css" href="%{#css}" />"

musachy


On Mon, Aug 18, 2008 at 10:00 AM, Ramez Hassan
<[EMAIL PROTECTED]> wrote:
> Hello Folks,
>
>
>
> I am trying to implement a theme enabled web application and the
> architecture is developed to upload themes to the application using jar or
> zip files with a certain directory structure. The problem is I don't know
> how to enable such a feature or how to extend struts control classes to
> perform such a thing.
>
>
>
> We are depending mainly on JSP 2.0 for the view and we need to reference
all
> images and css styles and layout from Jar files.
>
>
>
> Any Idea will be appreciated.
>
>
>
> Regards,
>
> Ramez Hassan
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
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