You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vladislav Kamensky <Vl...@atbusiness.com> on 2002/09/12 10:58:44 UTC
tiles question
Hi.
I am trying to use tiles in Struts 1.1.b and i found in the examples that tiles-defs.xml is referenced twice in application
1. web.xml
....
<!--init-param>
<param-name>definitions-config</param-name>
<param-value>/WEB-INF/tiles-defs.xml</param-value>
^^^^^^^^^^^^^^^^
2. struts-config.xml
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml
^^^^^^^^^^^^^^
.....
Seems that reference in the web.xml is superfluous. Am i right ?
And second question:
In . struts-config.xml there is following string:
<!-- Not used by tiles or this website, but needed due to a bug in actual Struts version -->
<message-resources parameter="org.apache.struts.webapp.tiles.dev1-1.ApplicationResources" null="false"/>
What does it mean ?
--
Vlad Kamensky,
@Business SPb.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: tiles question
Posted by Cedric Dumoulin <ce...@apache.org>.
Vladislav Kamensky wrote:
>Hi.
>
>I am trying to use tiles in Struts 1.1.b and i found in the examples that tiles-defs.xml is referenced twice in application
>
>1. web.xml
>....
><!--init-param>
> <param-name>definitions-config</param-name>
> <param-value>/WEB-INF/tiles-defs.xml</param-value>
> ^^^^^^^^^^^^^^^^
>
>
>2. struts-config.xml
> <plug-in className="org.apache.struts.tiles.TilesPlugin">
> <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml
> ^^^^^^^^^^^^^^
>.....
>
>Seems that reference in the web.xml is superfluous. Am i right ?
>
The plugin loads the config from web.xml, and override them with the
data from struts-config.xml. This allows to have a centralized point for
default values of tiles config data.
>
>And second question:
>In . struts-config.xml there is following string:
> <!-- Not used by tiles or this website, but needed due to a bug in actual Struts version -->
> <message-resources parameter="org.apache.struts.webapp.tiles.dev1-1.ApplicationResources" null="false"/>
>
>What does it mean ?
>
Try to comment the tag, and check if your application complains. If
not, you can remove the tag. If there is an error, uncomment the tag.
This was a bug in some Struts release where an error was thrown when no
ApplicationResources was specified, even if you don't use this resources.
Cedric
>
>
>--
>Vlad Kamensky,
> @Business SPb.
>
>
>
>
>--
>To unsubscribe, e-mail: <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>