S
Stephan Melchior
Hi to all,
I have a newbie problem and I would appreciate any help.
Thanks in advance.
I have the following constellation:
struts-config.xml:
<snip >
<plug-in className= "org.apache.struts.tiles.TilesPlugin " >
<set-property property= "definitions-config "
value= "/WEB-INF/tiles-defs.xml " / >
<set-property property= "moduleAware " value= "true " / >
<set-property property= "definitions-parser-validate " value= "true "
/ >
</plug-in >
<snap >
tiles-defs.xml
<snip >
<tiles-definitions>
<definition name="definitionName" page="/layouts/layout1.jsp">
<put name="title" value="to be specified" />
<put name="header" value="/tiles/header.jsp" />
<put name="footer" value="/tiles/footer.jsp" />
<pat name="body" value="to be specified" />
</definition>
</tiles-definitions>
<snap >
All referenced JSP exist in the webapp!
Additionally I have a JSP index.jsp that looks like this:
<snip >
<tiles:insert beanName="definitionName"/>
<snap >
There are no action-mappings in the struts-config.xml!
When I call the index.jsp I receive the following error:
org.apache.jasper.JasperException: Error - Tag Insert : No value
defined for bean 'definitionName' with property 'null' in scope
'null'.
I know, that means that there is no bean with this name in any
context.
I check this with <logic:notPresent name="definitionName"
scope="application">
But I have read that the in the case i figured out, all definitions in
tiles-defs.xml are available in the application context under their
"name" attribute. But it seems that I'm wrong.
Does anyone know what goes wrong here. Or do I have to use
action-mappings to work with xml-based definitions?
Greetings
Stephan
I have a newbie problem and I would appreciate any help.
Thanks in advance.
I have the following constellation:
struts-config.xml:
<snip >
<plug-in className= "org.apache.struts.tiles.TilesPlugin " >
<set-property property= "definitions-config "
value= "/WEB-INF/tiles-defs.xml " / >
<set-property property= "moduleAware " value= "true " / >
<set-property property= "definitions-parser-validate " value= "true "
/ >
</plug-in >
<snap >
tiles-defs.xml
<snip >
<tiles-definitions>
<definition name="definitionName" page="/layouts/layout1.jsp">
<put name="title" value="to be specified" />
<put name="header" value="/tiles/header.jsp" />
<put name="footer" value="/tiles/footer.jsp" />
<pat name="body" value="to be specified" />
</definition>
</tiles-definitions>
<snap >
All referenced JSP exist in the webapp!
Additionally I have a JSP index.jsp that looks like this:
<snip >
<tiles:insert beanName="definitionName"/>
<snap >
There are no action-mappings in the struts-config.xml!
When I call the index.jsp I receive the following error:
org.apache.jasper.JasperException: Error - Tag Insert : No value
defined for bean 'definitionName' with property 'null' in scope
'null'.
I know, that means that there is no bean with this name in any
context.
I check this with <logic:notPresent name="definitionName"
scope="application">
But I have read that the in the case i figured out, all definitions in
tiles-defs.xml are available in the application context under their
"name" attribute. But it seems that I'm wrong.
Does anyone know what goes wrong here. Or do I have to use
action-mappings to work with xml-based definitions?
Greetings
Stephan