This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Struts and the fly likes Struts 1.3 Tiles not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 1.3 Tiles not working " Watch "Struts 1.3 Tiles not working " New topic
Author

Struts 1.3 Tiles not working

Sameer Raza Ali
Greenhorn

Joined: Oct 15, 2009
Posts: 20
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


SCJP 1.4 , SCWCD 5.0
Sameer Raza Ali
Greenhorn

Joined: Oct 15, 2009
Posts: 20
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Struts 1.3 Tiles not working