Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

tiles-def.xml in WSAD5.1

 
vijaya bacina
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
thanx
Lavanya
 
vijaya bacina
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
strutsconfig.xml plugin code
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
</plug-in>
strutsconfig.xml action code
<action-mappings>
<action path="/viewPDS" type="org.apache.struts.action.Action">
<forward name="success" path=".viewPDS" contextRelative="false"/>
</action>
</action-mappings>

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"/>
</definition>
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic