Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Struts and Tiles

Status
Not open for further replies.

marie5210

Programmer
Oct 12, 2005
1
FR
Hi,

I am trying to create tiles-definitions and to reference them from a struts application. But I encounter some problems.

First, I have configure my struts application adding:
<taglib>
<taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
to the web.xml and

<plug-in className="org.apache.struts.tiles.TilesPlugin" >
<set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
<set-property property="definitions-debug" value="2" />
<set-property property="definitions-parser-details" value="2" />
<set-property property="definitions-parser-validate" value="true" />
</plug-in>
to the struts-config.

In the tiles-def.xml, I define

<!-- Defintion of the standard layout-->
<definition name="standard" path="testLayout.jsp">
<put name="header" value="testHeader.jsp"/>
</definition>

I then try to make a forward from a struts page, using the standard name but i does not work.

My index.jsp is as follows:

<body>
<logic:forward name="forwardIndex"/>
</body>

And in the struts-config; I put:

<global-forwards>
<forward name="forwardIndex" path="standard" />
</global-forwards>

But it tells me that the standard resource does not exist.
Do I make an error calling the standard pagean you help me to find where is the problem?

Thanks

Marie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top