tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbeam <>
Subject Re: JSTL forEach acting funny
Date Thu, 02 Dec 2004 13:06:08 GMT
On Thursday 02 December 2004 07:39 am, Allistair Crossley wrote:
> for a question on forEach I would expect you to have copied in the 
forEach part ;) i am surprised if you are seeing the actual dollar 
signs and braces as tomcat should be picking those up as expression 
language. is there any errors in stdout? also, which scope are you 
placing your results into and how are you placing those results there, 
i.e what is row? what value are you suppluing items in forEach ...
> etc.. more info people!

Well its exactly like on the HOWTO page I linked to, you can see the 
whole thing there, including what my web.xml and server.xml files look 
like since I followed this by letter.

Actually I just found that passing a nonexistent collection token to 
forEach results in the same thing - it doesn't loop, and it doesn't 
error, and just outputs everything between the 
<c:forEach>...</c:forEach> tags as if nothing happened. To wit:

<c:forEach var="foo" items="${thisIsANonExistentCollection}">
    foo is ${foo}<br/>

just gives me:

foo is ${foo}

in the browser. Of course this behavior differs from every reasonable 
expectation of what a foreach type construct should do. So is there 
some misconfiguration?

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message