On 2019-12-10 8:23 a.m., Lukasz Lenart wrote:
wt., 10 gru 2019 o 14:15 <em...@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-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to