Hi Peter!

Thx a lot.. That worked. But why do 2 books not tell me this? Why do
they omit this? 

Thx, you saved me :D

Christian 

-----Ursprüngliche Nachricht-----
Von: Peter Smith [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 1. Juli 2003 23:28
An: Struts Users Mailing List
Betreff: Re: Problem with Tiles definitions in XML File


Hi Christian,

When inserting in a definition on a jsp page, you want to use the
"definition" attribute.  "beanName" can be used if the page you are
inserting is in a java bean.  Here is an example:

<tiles:insert definition="blablub" flush="true" />

Hope this helps, 

Peter
-- 
Peter Smith
Software Engineer
InfoNow Corporation

> From: "Christian Ambach" <[EMAIL PROTECTED]>
> Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Date: Tue, 1 Jul 2003 23:15:01 +0200
> To: <[EMAIL PROTECTED]>
> Subject: Problem with Tiles definitions in XML File
> 
> Dear list!
> 
> I've a problem with Tiles definitions in an XML file.
> 
> I searched a lot in my Struts books (Ted Husted and Chuck Cavaness)
and
> in Google, but I didn't find a clue to solve it :(
> 
> Here's the symptom:
> My JSP wants to use a definition and fails with this error:
>
------------------------------------------------------------------------
> -------------------------------------------------------------
> org.apache.jasper.JasperException: Error - Tag Insert : No value
defined
> for bean 'blablub' with property 'null' in scope 'null'.
> at
>
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
> va:248)
> 
> root cause 
> 
> javax.servlet.ServletException: Error - Tag Insert : No value defined
> for bean 'blablub' with property 'null' in scope 'null'.
> at
>
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContex
> tImpl.java:530)
>
------------------------------------------------------------------------
> -------------------------------------------------------------
> 
> JSP source is:
> -----------------------------------------------------------
> <%@ taglib uri="/tags/struts-tiles" prefix="tiles" %>
> <%@ taglib uri="/tags/struts-nested" prefix="nested" %>
> <%@ taglib uri="/tags/struts-logic" prefix="logic" %>
> <%@ taglib uri="/tags/struts-html" prefix="html" %>
> <%@ taglib uri="/tags/struts-bean" prefix="bean" %>
> <%@ page 
> language="java"
> contentType="text/html; charset=ISO-8859-1"
> %>
> <tiles:insert beanName="blablub" flush="true" >
> <tiles:put name="body" type="string" >
> testcontent
> </tiles:put>
> </tiles:insert>
> -----------------------------------------------------------
> 
> struts-config.xml contains
> -----------------------------------------------------------
> <plug-in className="org.apache.struts.tiles.TilesPlugin">
> <set-property property="definitions-config"
> value="/WEB-INF/tiles-defs.xml" />
> <set-property property="definitions-debug" value="2" />
> <set-property property="definitions-parser-details"
> value="2" />
> <set-property property="definitions-parser-validate"
> value="false" />
> <set-property property="moduleAware" value="false"/>
> </plug-in>
> -----------------------------------------------------------
> 
> tiles-defs.xml
> -----------------------------------------------------------
> <tiles-definitions>
> <definition name="blablub" path="/pages/common/mainlayout.jsp">
> <put name="menu" value="/pages/common/menu.jspf"/>
> <put name="body" value="/pages/common/defaultbody.jspf"/>
> </definition>
> </tiles-definitions>
> -----------------------------------------------------------
> 
> 
> I'm using Struts 1.1 and 1.1-b3 on Tomcat 4.1.18 and 4.1.24, no
> differences.
> 
> 
> As far as I can see with the debugger the factory correctly parses and
> stores the definitions. But when the taglib tries to find the Factory
in
> the Context it receives a null value and therefore returns a null for
> the bean :(
> 
> 
> Thx for help, this cost me about 10h now and you are my last hope.
> 
> Hopefully,
> 
> Christian Ambach
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to