I am learning jsf. I get class cast exception in java.lang.String when I use the following code:
<f:facet name="header">
<f:subview id="header">
<tiles:insert attribute="header" flush="false"/>
</f:subview>
</f:facet>
If I replace the subview id with another name other than header the code runs successfully. Eg
<f:facet name="header">
<f:subview id="header1">
<tiles:insert attribute="header" flush="false"/>
</f:subview>
</f:facet>
I am using core java server faces book by David Geary and Cay Horstmann. The example given in the book has same value for facet name and subview id. Please explain why we should give different values for facet name and subview id.