struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emi <em...@encs.concordia.ca>
Subject Re: struts2.5.22 + tiles3.0.8 + commons-beanutils to version 1.9.4
Date Tue, 10 Dec 2019 14:20:12 GMT
On 2019-12-10 8:23 a.m., Lukasz Lenart wrote:
> wt., 10 gru 2019 o 14:15 <emilu@encs.concordia.ca> napisał(a):
>>> Why do you use "CompleteAutoloadTilesListener" ? And as far I see
>>> everything works in the Showcase app
>> My application based on tiles3 + struts. As suggested by
>> https://struts.apache.org/plugins/tiles-3/ ,
>> CompleteAutoloadTilesListener is used. If there are other config that
>> could help set tiles3 + struts, could you help suggest please?
> As mentioned on the page:
> | This plugin was dropped in Struts 2.5, instead please use Tiles
> Plugin which was extended and upgraded to Tiles 3.
>
> So please switch into the Tiles Plugin and all you need is this:
>
> <listener>
>    <listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
> </listener>
>
> https://struts.apache.org/plugins/tiles/


<action name="action1"  method="m1" class="action1">
          <result name="success" type="tiles">main_menu</result>
</action>


[web.xml]
   <context-param>
       <param-name>
org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
       </param-name>
       <param-value>
          /WEB-INF/tiles/menu/tiles-menu.xml
       </param-value>
    </context-param>


The above config works for CompleteAutoloadTilesListener.


Updated to StrutsTilesListener, got exception:

Cannot find definition named 'main_menu'
org.apache.tiles.definition.NoSuchDefinitionException: Cannot find 
definition named 'main_menu'



May I know are there config/set that I miss or should be updated please?

Thanks a lot.

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


Mime
View raw message