• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 1.3 Tiles not working

 
Sameer Raza Ali
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am Unable to get tiles to work in my application . I am using Struts 1.3 , stuts-tiles-1.3.10.jar is in the lib folder I am building this application on top of struts-blank.war


The struts-config.xml



tiles-defs.xml


I am not sure if tiles is being intialized properly this is all i get in tomcat console regarding tiles

Jan 8, 2013 10:24:11 PM org.apache.struts.tiles.TilesPlugin initDefinitionsFactory
INFO: Tiles definition factory loaded for module ''.

I guess something more should appear ?

on accessing the application forward action throws the following exception

WARNING: Unhandled exception
java.lang.IllegalArgumentException: Path search.page does not start with a "/" character
at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:431)


Have I missed something please help
 
Sameer Raza Ali
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After a lot of hit and trials and head banging. This problem is solved . i was using struts 1.3 however was relying on old documentation and my previous experience to get tiles to work in my application
I was missing an entry in web.xml file.

If you want to use Tiles, you must instruct Struts to use a configuration file included in the struts-tiles JAR instead. To do this:

Add a chainConfig init-param in the web.xml pointing to the location of the chain-config.xml

<init-param>
<param-name>chainConfig</param-name>
<param-value>org/apache/struts/tiles/chain-config.xml</param-value>
</init-param>

Add this init-param to the Action Servlet definition in web.xml

I did not recieve any replies to my question if somebody would have pointed this out it would have saved me a lot of time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic