I've been using tiles quite happily with tc5. But i never use get.
I always use useAttribute and then just el to display stuff.
<%@ page isELIgnored="false" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
<tiles:useAttribute id="foo" name="inHead" scope="page" />
${foo}
could be a solution for you.
On 18 Jun 2004, at 00:28, Matt Bathje wrote:
Hey all.
I'm attempting to upgrade my application to tomcat 5 from tomcat 4.1.
Most stuff is working fine, but we have a few places where the tile is
defined in tiles-defs.xml as blank, meaning:
<put name="inHead" value =""/>
This worked fine in tomcat 4, but in the tomcat 5 version, when the
jsp page
tries to use that part of the tile (<tiles:get name="inHead" />)
it crashes on me. A partial stack trace is below - if anybody really
wants
the whole thing let me know.
The basic error is a string index out of range error, from
java.lang.String.substring.
Since this worked I always assumed it was somethign that is valid to
do in
tiles. It makes the tiles-defs file a lot nicer to look at anyways. Is
it
really something that shouldn't be done? Or is tomcat 5 broken somehow?
Thanks in advance,
Matt Bathje
partial stack trace:
2004-06-17 17:06:21 ApplicationDispatcher[] Servlet.service() for
servlet
action threw exception
java.lang.StringIndexOutOfBoundsException: String index out of range:
-1
at java.lang.String.substring(String.java:1438)
at java.lang.String.substring(String.java:1411)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:193)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
ation
FilterChain.java:237)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terCh
ain.java:157)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispat
cher.
java:703)
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDis
patch
er.java:589)
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispa
tcher
.java:499)
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.j
ava:9
66)
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:
581)
at
org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:
142)
at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:178)
at
org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:799)
at
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertT
ag.ja
va:931)
at
org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:501)
at
org.apache.jsp.WEB_002dINF.tiles.public_.layouts.base_jsp._jspx_meth_ti
les_g
et_0(base_jsp.java:511)
at
org.apache.jsp.WEB_002dINF.tiles.public_.layouts.base_jsp._jspService(b
ase_j
sp.java:162)
---------------------------------------------------------------------
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]