Tiles Problem with definitions Error - Tag Insert

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
 
N

nooobody

Stephan said:
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 "
/ >

This block has a space before each quote. Get rid of those and try it
again.
 
S

Stephan Melchior

Sorry the blanks are not in the struts-config file:

<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config"
value="/WEB-INF/tiles-defs.xml" />
<set-property property="moduleAware" value="false" />
<set-property property="definitions-parser-validate"
value="true" />
</plug-in>

Doesn't work!
 
T

Tiga

On 27 Feb 2005 07:52:12 -0800, (e-mail address removed) (Stephan
Melchior) wrote:

Additionally I have a JSP index.jsp that looks like this:
<snip >
<tiles:insert beanName="definitionName"/>

try <tiles:insert definition="definitionName"/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top