Kavish
Kavish

Reputation: 21

Error in Struts 2 app with Tiles: java.lang.NoClassDefFoundError: org/apache/tiles/listener/TilesListener

I am getting this error, although I've already put necessary jar files for Tiles:

SEVERE: Exception while loading the app 
SEVERE: Undeployment failed for context /FinalTilesStruts2 
SEVERE: Exception while loading the app : 
 java.lang.IllegalStateException: ContainerBase.addChild: start: 
 org.apache.catalina.LifecycleException:
 java.lang.IllegalArgumentException: 
 java.lang.NoClassDefFoundError: org/apache/tiles/listener/TilesListener

Upvotes: 2

Views: 5815

Answers (1)

Roman C
Roman C

Reputation: 1

The class org.apache.tiles.listener.TilesListener only available in the Tiles 2.0.3 that you can download here.

In higher versions of Tiles the listener class is org.apache.tiles.web.startup.TilesListener.

You can read this answer if it help you resolve problem with the right listener class.

If you are using Tiles 2 with Struts 2 then you should use

<listener>
    <listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
</listener>

Upvotes: 1

Related Questions