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 Þorgils Völundarson <th...@krabb.is> on 2004/06/17 21:15:34 UTC

jsp 2.0 el string functions error

Does anybody know what this error is and how to awoid it?

         root cause
         javax.servlet.jsp.JspTagException: Don't know how to iterate over 
supplied "items" in <forEach>

I'm using java web services (jwsdp-1.3) on linux. When I use the sql taglib 
to get data from database and then try to use el string functions on the 
outcome the error message above is given. This is the line of code I'm 
using which by the way works perfectly with static string

         ${fn:substring(nullString,1, fn:length(nullString)) }

Appreciate any help

Regards,
Thorgils Volundarson
Icelandic Cancer Registry
thorgils@krabb.is

Re: jsp 2.0 el string functions error

Posted by Þorgils Völundarson <th...@krabb.is>.
Thank you for your reply. I found out that fn:length function can't be used 
to get the length of an integer object from sql query. So instead I changed 
my query to get the length of the variable and passed that to my 
fn:substring function. It appears that fn:length can only be done on 
strings but SELECT LENGTH() can be used both for integer and string functions

At 14:13 21.6.2004, you wrote:
>Basically, it means you're passing something to the <c:forEach> tag that it
>can't iterate over. In other words, it's not an array, a Collection, an
>Iterator, an Enumeration, a Map, a String, or null. Could you provide an
>example of how you're using <c:forEach>?
>
>Quoting Þorgils Völundarson <th...@krabb.is>:
>
> > Does anybody know what this error is and how to awoid it?
> >
> >          root cause
> >          javax.servlet.jsp.JspTagException: Don't know how to iterate over
> > supplied "items" in <forEach>
> >
> > I'm using java web services (jwsdp-1.3) on linux. When I use the sql 
> taglib
> > to get data from database and then try to use el string functions on the
> > outcome the error message above is given. This is the line of code I'm
> > using which by the way works perfectly with static string
> >
> >          ${fn:substring(nullString,1, fn:length(nullString)) }
> >
> > Appreciate any help
> >
> > Regards,
> > Thorgils Volundarson
> > Icelandic Cancer Registry
> > thorgils@krabb.is
>
>--
>Kris Schneider <ma...@dotech.com>
>D.O.Tech       <http://www.dotech.com/>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: taglibs-user-help@jakarta.apache.org

Kveðja,
Þorgils Völundarson
Krabbameinsfélag Íslands, Krabbameinsskrá
Beinn sími: 540 1973
netfang: thorgils@krabb.is
gsm: 698 5302

__________________________________________________________________
Krabbameinsfélagið er áhugamannafélag
rekið fyrir velvild almennings.
Þitt framlag skiptir máli!

Krabbameinsfélag Íslands er áhugamannafélag
sem var stofnað fyrir meira en hálfri öld og er
tilgangur þess að styðja og efla í hvívetna
baráttuna gegn krabbameini.  Krabbameinsfélagið
sinnir mikilvægu fræðslu- og leitarstarfi, stundar
rannsóknir og annast skráningu krabbameina.
Á vegum félagsins starfa stuðningshópar sjúklinga og veitt er símráðgjöf og 
heimahlynning.

Re: jsp 2.0 el string functions error

Posted by Kris Schneider <kr...@dotech.com>.
Basically, it means you're passing something to the <c:forEach> tag that it
can't iterate over. In other words, it's not an array, a Collection, an
Iterator, an Enumeration, a Map, a String, or null. Could you provide an
example of how you're using <c:forEach>?

Quoting Þorgils Völundarson <th...@krabb.is>:

> Does anybody know what this error is and how to awoid it?
> 
>          root cause
>          javax.servlet.jsp.JspTagException: Don't know how to iterate over 
> supplied "items" in <forEach>
> 
> I'm using java web services (jwsdp-1.3) on linux. When I use the sql taglib 
> to get data from database and then try to use el string functions on the 
> outcome the error message above is given. This is the line of code I'm 
> using which by the way works perfectly with static string
> 
>          ${fn:substring(nullString,1, fn:length(nullString)) }
> 
> Appreciate any help
> 
> Regards,
> Thorgils Volundarson
> Icelandic Cancer Registry
> thorgils@krabb.is

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

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