• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

forEachToken

 
Sundar Murthi
Ranch Hand
Posts: 209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In HFS page 465 the core action given as <c:forEachToken> but in jstl spec they are given as <c:forTokens>.
<c:forEachToken> is not working it throw an exception

but <c:forTokens> is working fine.

its a bug in HFS?
 
Sami Sayeed
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
Thats an error in the book,
its c:forTokens, download the errata from www.wickedlysmart.com
<%
// this is just for a test, we must avoid to use scripting in jsps
String [] names={"one",two","three"};
request.setAttribute("names",names);
%>
<c:forTokens items="${names}" delims="," var="name">
${name}
</c:forTokens>
sami
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic