You are viewing a plain text version of this content. The canonical link for it is here.
Posted to taglibs-user@tomcat.apache.org by Dh...@iflexsolutions.com on 2003/12/22 13:04:52 UTC

Tiles problem!!!


I am trying out 'Declaring definition in a configuration file'

I have added below lines in struts-config.xml

  <plug-in className="org.apache.struts.tiles.TilesPlugIn">
    <set-property property="definitions-config"
value="/WEB-INF/tiles-practice-defs.xml"/>
    <set-property property="definitions-debug" value="2"/>
    <set-property property="definitions-parser-details" value="2"/>
    <set-property property="definitions-parser-validate" value="true"/>
    <set-property property="moduleAware" value="true" />    
  </plug-in>


Below are the contents of tiles-practice-defs.xml, which I have placed
in WEB-INF folder:

<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration//EN"
"http://jakarta.apache.org/struts/dtds/tiles-config.dtd">

<tiles-definitions>
	<definition name="appln.default" path="/ApplnDefaultLayout.jsp">
		<put name="header" value="Menu.jsp"/>
		<put name="menubar" value="Menu.jsp"/>
		<put name="copyright" value="copyright.jsp"/>	
	</definition>
</tiles-definitions>


Below are the contents of the TilesDefsTest.jsp page:


<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>


<tiles:insert beanName="appln.default" beanScope="request">
	<tiles:put name="body-content" value="/index.jsp"/>
</tiles:insert>


I get following error:

org.apache.jasper.JasperException: Error - Tag Insert : No value defined
for bean 'appln.default' with property 'null' in scope 'request'. 

I am using Tomcat 4.1.27 with Struts 1.1

Regards

Dhiraj



DISCLAIMER:
This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.

---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Re: Tiles problem!!!

Posted by "K.C. Baltz" <kc...@lollimail.com>.
I suspect you'll get more help if you re-post your question to the 
struts-user mailing list as Tiles is really more of a Struts API than 
jakarta-taglibs. 

That being said,  I don't think you want to use beanName and beanScope.  
I would have expected you to use it like this:

<tiles:insert definition="appln.default" >
	<tiles:put name="body-content" value="/index.jsp"/>
</tiles:insert>


K.C.

Dhiraj.Gupta@iflexsolutions.com wrote:

>I am trying out 'Declaring definition in a configuration file'
>
>I have added below lines in struts-config.xml
>
>  <plug-in className="org.apache.struts.tiles.TilesPlugIn">
>    <set-property property="definitions-config"
>value="/WEB-INF/tiles-practice-defs.xml"/>
>    <set-property property="definitions-debug" value="2"/>
>    <set-property property="definitions-parser-details" value="2"/>
>    <set-property property="definitions-parser-validate" value="true"/>
>    <set-property property="moduleAware" value="true" />    
>  </plug-in>
>
>
>Below are the contents of tiles-practice-defs.xml, which I have placed
>in WEB-INF folder:
>
><!DOCTYPE tiles-definitions PUBLIC
>"-//Apache Software Foundation//DTD Tiles Configuration//EN"
>"http://jakarta.apache.org/struts/dtds/tiles-config.dtd">
>
><tiles-definitions>
>	<definition name="appln.default" path="/ApplnDefaultLayout.jsp">
>		<put name="header" value="Menu.jsp"/>
>		<put name="menubar" value="Menu.jsp"/>
>		<put name="copyright" value="copyright.jsp"/>	
>	</definition>
></tiles-definitions>
>
>
>Below are the contents of the TilesDefsTest.jsp page:
>
>
><%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
>
>
><tiles:insert beanName="appln.default" beanScope="request">
>	<tiles:put name="body-content" value="/index.jsp"/>
></tiles:insert>
>
>
>I get following error:
>
>org.apache.jasper.JasperException: Error - Tag Insert : No value defined
>for bean 'appln.default' with property 'null' in scope 'request'. 
>
>I am using Tomcat 4.1.27 with Struts 1.1
>
>Regards
>
>Dhiraj
>
>
>
>DISCLAIMER:
>This message contains privileged and confidential information and is intended only for the individual named.If you are not the intended recipient you should not disseminate,distribute,store,print, copy or deliver this message.Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain viruses.The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org