Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / March 2005

Tip: Looking for answers? Try searching our database.

Tiles Problem with definitions Error - Tag Insert

Thread view: 
Stephan Melchior - 27 Feb 2005 15:52 GMT
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
nooobody - 28 Feb 2005 04:00 GMT
> Hi to all,
>
[quoted text clipped - 10 lines]
> <set-property property= "definitions-parser-validate " value= "true "
> / >

This block has a space before each quote. Get rid of those and try it
again.
Stephan Melchior - 28 Feb 2005 19:15 GMT
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!
Tiga - 11 Mar 2005 05:46 GMT
<snip>
>Additionally I have a JSP index.jsp that looks like this:
><snip >
><tiles:insert beanName="definitionName"/>

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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.