简体   繁体   中英

Tiles2 not working with struts2

I am working on struts2 and using tiles in my application we use Netbeans7.1. But we got an error "The module has not been deployed.See the server log for details."

"Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.NoClassDefFoundError: org/apache/commons/digester/Rule"

we add listener in web.xml

web.xml file

 <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>

    <param-value>/WEB-INF/tiles.xml</param-value>

</context-param>

<listener>
    <listener-class>org.apache.tiles.web.startup.TilesListener</listener-class>
</listener>

struts.xml file

Take a look at the Struts2 Tiles Plugin Documentation.

You web.xml should look a little bit different then yours.

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

And don't forget to add apache common digester jar to your lib folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM