tags:

views:

967

answers:

2

I am new to struts2 tiles. Here i am trying to execute 1 simple application using struts2 tiles. While executing following application i m getting error :

Cannot load org.apache.tiles.web.startup.TilesListener reason : org.apache.tiles.web.startup.TilesListener java.lang.ClassNotFoundException: org.apache.tiles.web.startup.TilesListener

MY WEB.xml looks like :

<?xml version="1.0" encoding="UTF-8"?>

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

<context-param>
    <param-name>tiles-definitions</param-name>
    <param-value>/WEB-INF/myTilesConfigFile.xml</param-value>
</context-param>
<listener>
    <listener-class>org.apache.tiles.web.startup.TilesListener</listener-class>
</listener>

<welcome-file-list>
    <welcome-file>/home.jsp</welcome-file>
</welcome-file-list>

A: 

Your classpath is missing the indicated library at runtime.

I believe the correct listeners are either standard tiles listener (org.apache.tiles.listener.TilesListener) or the Struts2 one (org.apache.struts2.tiles.TilesListener)

WiseTechi
Try out above code. But still not resolve above problem....
Nirmal
A: 

use this listener in your web.xml:

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