Hi,
I'm using struts 2.1.6, xwork-2.1.2, freemarker 2.3.13, ognl 2.6.11 and jboss
5.0.1.
I'm having one ftl, where I'm doing the following
<#list "${additionalMethods}"?split(",") as additional>
<#assign tmpInner>${additional?trim?substring(0,
additional?trim?index_of(":"))}</#assign>
</#list>
But this gives me the following error:
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of
range: -1
at java.lang.String.substring(String.java:1938)
at
freemarker.core.StringBuiltins$substringBI$1.exec(StringBuiltins.java:213)
I checked the length of the string which is 28 and the index_of ":" is 7.
Also I tried, ${additional?trim?substring(0, 1)} - this also gives the above
error.
I don't know what the problem here is.
Please advice.
Thank you.
Regards,
Kishan.G
Team Leader.
www.spansystems.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]