Hi,
I followed your suggestion
In mainfile:
<tiles:put name='stepimage' content='/images/dealerapp1of7.gif' direct='true'/>
In a layout file: <bean:define id="img"> <tiles:get name='stepimage' flush="true" /> </bean:define> <html:img page="<%=img%>" height="10" />
But I got following generated:
<img src="/validatorCan't insert page 'stepimage' : Illegal to flush within a custom tag
java.io.IOException: Illegal to flush within a custom tag
at javax.servlet.jsp.tagext.BodyContent.flush(BodyContent.java:79)
at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:878)
at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
at org.apache.jsp.header_jsp._jspx_meth_tiles_get_0(header_jsp.java:196)
at org.apache.jsp.header_jsp._jspService(header_jsp.java:103)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
at
<.... stripped ... >
What could be wrong?
Thanks,
Phong.
On Tue, 28 Sep 2004, James Mitchell wrote:
That's correct. You cannot nest custom taglibs.
Try separating them:
<bean:define id="pg"> <tiles:get name='step'/> </bean:define> <html:img page="<%=pg%>" height="10" />
if 'step' was set to "/images/myImage.gif", and your app was "myApp", you would get:
<img src="/myApp/images/myImage.gif">
-- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx
----- Original Message ----- From: "Phong Nguyen Thanh" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 28, 2004 2:39 PM Subject: How to use tiles:get together with html:img
Hi,
I want to do something like this
<html:img page="<tiles:get name='step'/>" height="10" />
step will represent some images that is dynamically put into using tiles:put. But what I got is
<img src="/validator<tiles:get name='title'/>"
i.e. <tiles:get name='step'/> is not get expanded.
Can I do the above and how?
Thank you very much.
Kind regards,
Phong.
--------------------------------------------------------------------- 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]