File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes tiles-def.xml in WSAD5.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "tiles-def.xml in WSAD5.1" Watch "tiles-def.xml in WSAD5.1" New topic

tiles-def.xml in WSAD5.1

vijaya bacina
Ranch Hand

Joined: Aug 23, 2005
Posts: 155
Hi all,
I am new to Tiles.. i wrote a simple example using tiles and struts in WSAd5.1.. i haven't found tiles-def.xml in web-inf folder by default... do i need to create one?? if so where do i need to declare that tiles-def.xml is the definitions file for this project?? Plz help
vijaya bacina
Ranch Hand

Joined: Aug 23, 2005
Posts: 155
I created a tiles-def.xml file and added
then i am able to use tiles-def tags..

and then i added the tiles plugin to struts-config.xml

i created a definition in tiles-def.xml like this

when i use this definition in struts-config.xml

It is getting error like "broken link .viewPDS"
do i need to add anymore.or is anything wrong in code..plzzz help
vijaya bacina
Ranch Hand

Joined: Aug 23, 2005
Posts: 155
strutsconfig.xml plugin code
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
strutsconfig.xml action code
<action path="/viewPDS" type="org.apache.struts.action.Action">
<forward name="success" path=".viewPDS" contextRelative="false"/>

tiles-def.xml definition code
<definition name=".viewPDS" extends="basic.layout">
<put name="tilte" value="Welcome to View PDS"/>
<put name="content" value="viewPDS.jsp"/>
Marc Peabody
pie sneak

Joined: Feb 05, 2003
Posts: 4727

Where's the code?

If the broken link warning is accompanied by a yellow squiggly line in your code, you can probably ignore it and try out your application.

It's common for WSAD to complain about broken links that aren't really broken, especially so in struts-config files.

A good workman is known by his tools.
I agree. Here's the link:
subject: tiles-def.xml in WSAD5.1
It's not a secret anymore!