Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mixing JSTL and JSP?

 
Gary Seibold
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I mix JSP code in with my JSTL? Can I access variables from the JSTL?

I would like to do something like....
<c:forEach var="theList" items="${sessionScope.results}">
<c:set var="previousList" value="${theList[0]}"/>
<%
String reply = javaFunction(previousList);//<<< from JSTL? or ${previousList}
%>
<c ut value="${theList[0]}"/>
</c:forEach>

Is there another way to do this (other than all JSP)?
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, no, yes (in fact the way you display doesn't work).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic