You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by otisg <ot...@ureach.com> on 2003/04/24 22:24:54 UTC

web.xml, multiple Struts configs, loading resources 1+ times

Hello,

Consider a setup where you have multiple Struts config files
listed in web.xml.
If each of them contains this

<message-resources ....>

<plug-in>
  ....
</plug-in>



Will the above resources (e.g. resource file, Validator XML
files, Tiles XML file) be loaded multiple times?

If yes, is this a problem?

Does it make a difference if multiple Struts config files are
listed in web.xml as either different Struts modules, or as a
single web app, but as a comma-separated list of Struts config
files?

Thank you,
Otis



________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

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


Re: web.xml, multiple Struts configs, loading resources 1+ times

Posted by James Mitchell <jm...@apache.org>.
The configuration files are parsed one at a time.  Any duplicate resources
will overwrite the previous.

This also happens if you declare two message resource files in the same
configuration file.  As David mentioned a few days ago, "the last one
quietly wins".

--
James Mitchell
Software Developer/Struts Evangelist
http://www.open-tools.org



----- Original Message -----
From: "otisg" <ot...@ureach.com>
To: <st...@jakarta.apache.org>
Sent: Thursday, April 24, 2003 4:24 PM
Subject: web.xml, multiple Struts configs, loading resources 1+ times


> Hello,
>
> Consider a setup where you have multiple Struts config files
> listed in web.xml.
> If each of them contains this
>
> <message-resources ....>
>
> <plug-in>
>   ....
> </plug-in>
>
>
>
> Will the above resources (e.g. resource file, Validator XML
> files, Tiles XML file) be loaded multiple times?
>
> If yes, is this a problem?
>
> Does it make a difference if multiple Struts config files are
> listed in web.xml as either different Struts modules, or as a
> single web app, but as a comma-separated list of Struts config
> files?
>
> Thank you,
> Otis
>
>
>
> ________________________________________________
> Get your own "800" number
> Voicemail, fax, email, and a lot more
> http://www.ureach.com/reg/tag
>
> ---------------------------------------------------------------------
> 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