You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ge...@multitask.com.au on 2003/06/30 09:32:12 UTC

Modules and common files

Hi,

We have just started using modules and have run into a problem when it 
comes
to common files between the modules (eg: javascript, stylesheets, images). 
It
appears that all files required for a module must be in that module's 
directory.
Which means that if all modules used the same stylesheet, I would have to 
duplicate it
across each module.

I have experimented a little and found that I could make a bunch of 
context relative global
forwards in each module config, but I don't want to have to do that for 
all the files!!

Has anyone else had this problem? If so, what did you do?



Regards,

Geoff Bennett

Re: Modules and common files

Posted by Jing Zhou <ji...@netspread.com>.
There were some discussions in the developer list about
sharing common properties in modules. A *root* module
carries common properties while child modules *inherit*
these properties. Wish that could address your problems
in the future.

It is quite painful to have so many common files. In our
product, the common images are placed in one module,
and web forms in other modules could use the images
by using a term we called module path + file path.
The module path is '/' + module prefix + action path
in our demos.

For strict Struts solutions, you might consider
set src attribute in the img tags or use page
URL patterns without $M for common files.

Jing
Netspread Carrier
http://www.netspread.com

----- Original Message ----- 
From: <ge...@multitask.com.au>
To: <st...@jakarta.apache.org>
Sent: Monday, June 30, 2003 2:32 AM
Subject: Modules and common files


> Hi,
>
> We have just started using modules and have run into a problem when it
> comes
> to common files between the modules (eg: javascript, stylesheets, images).
> It
> appears that all files required for a module must be in that module's
> directory.
> Which means that if all modules used the same stylesheet, I would have to
> duplicate it
> across each module.
>
> I have experimented a little and found that I could make a bunch of
> context relative global
> forwards in each module config, but I don't want to have to do that for
> all the files!!
>
> Has anyone else had this problem? If so, what did you do?
>
>
>
> Regards,
>
> Geoff Bennett


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


Re: Modules and common files

Posted by Sandeep Takhar <sa...@yahoo.com>.
I have not done it, but there are definitions in each
request processor that can tell whether or not paths
are relative.  So the struts-config for the module has
a request processor element that has global
configuration info for the module.

sandeep
--- geoff@multitask.com.au wrote:
> Hi,
> 
> We have just started using modules and have run into
> a problem when it 
> comes
> to common files between the modules (eg: javascript,
> stylesheets, images). 
> It
> appears that all files required for a module must be
> in that module's 
> directory.
> Which means that if all modules used the same
> stylesheet, I would have to 
> duplicate it
> across each module.
> 
> I have experimented a little and found that I could
> make a bunch of 
> context relative global
> forwards in each module config, but I don't want to
> have to do that for 
> all the files!!
> 
> Has anyone else had this problem? If so, what did
> you do?
> 
> 
> 
> Regards,
> 
> Geoff Bennett


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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