I tried three of them seperatley, but it did not work. Should I modify the configuration variable in the BaseStrutsTestCase? I did not add there web.xml and tiles-defs.xml. As you suggested, I add this code into web.xml.
<listener> <listener-class> org.apache.tiles.web.startup.TilesListener </listener-class> </listener> <context-param> <param-name> org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG </param-name> <param-value> /WEB-INF/tiles-defs.xml,/org/apache/tiles/classpath-defs.xml </param-value> </context-param> Antonio Petrelli-3 wrote: > > 2008/6/26 ezgi <[EMAIL PROTECTED]>: >> >> This is the tiles.defs.xml : >> <listener> >> <listener-class> >> org.apache.struts2.tiles.StrutsTilesListener >> </listener-class> >> </listener> >> >> <servlet> >> <servlet-name>tiles</servlet-name> >> <servlet-class> >> org.apache.tiles.web.startup.TilesServlet >> </servlet-class> >> <init-param> >> <param-name> >> >> org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG >> </param-name> >> <param-value> >> /WEB-INF/tiles-defs.xml >> </param-value> >> </init-param> >> <load-on-startup>2</load-on-startup> >> </servlet> >> >> >> <filter> >> <filter-name>Tiles_Filter</filter-name> >> <filter-class> >> org.apache.tiles.web.startup.TilesFilter >> </filter-class> >> <init-param> >> <param-name> >> >> org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG >> </param-name> >> <param-value> >> /WEB-INF/tiles-defs.xml >> </param-value> >> </init-param> >> </filter> >> >> <filter-mapping> >> <filter-name>Tiles_Filter</filter-name> >> <url-pattern>/*</url-pattern> >> <dispatcher>REQUEST</dispatcher> >> </filter-mapping> > > The problem is that you are using StrutsTilesListener (that loads > /WEB-INF/tiles.xml by default), TilesServlet and TilesFilter at the > same time. > Choose one and configure it. I suggest to use StrutsTilesListener > only. Configuring it means putting a context parameter. See: > http://tiles.apache.org/tutorial/configuration.html > > Antonio > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/jUnit-Testing-Problem-with-Tiles-tp18131822p18132646.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]