This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Struts and the fly likes Definition Using A  definition Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Definition Using A  definition " Watch "Definition Using A  definition " New topic
Author

Definition Using A definition

Venu
Greenhorn

Joined: Sep 15, 2005
Posts: 1
hi,
Using struts 1.2 and tomcat 4.x

I'm trying to reuse a definition in another definition in tiles-def.xml. Below is the similar code of whatI'm trying to do.

xLayout.jsp has two insert tages body1 and body2.
<tiles:insert attribute="body1"/>
<tiles:insert attribute="body2"/>

commonLayout.jsp has 'nav' and 'body' as insert tages.
<tiles:insert attribute="nav"/>
<tiles:insert attribute="body"/>

***
tiles-def.xml

<definition name="bodyXDef" path="/xLayout.jsp">
<put name="body1" value="/content1.jsp"/>
<put name="body2" value="/content2.jsp"/>
</definition>

<definition name="bodyX_navDef" path="/commonLayout.jsp">
<put name="nav" value="/xNav.jsp"/>
<put name="body" value="bodyXDef"/>
</definition>
****

I'm getting an error message "org.apache.jasper.JasperException: Path customerSummaryDef does not start with a "/" character",
and I'm getting a blank page if I use '/' (<put name="body" value="/bodyXDef"/> before the definition.

Can I use definition in a definition (not extends) as in the example above? If so can any help me if any thing is wrong in doing this?

Thank you...


VG
 
Don't get me started about those stupid light bulbs.
 
subject: Definition Using A definition