Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can we combine java code with JSTL

sirisha alam
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am pretty new to JSTL, and we are trying to change the existing application which is using java code snippets in the jsp file to use JSTL. We are trying to change it in parts, not all at a time.
Currently we have some valiables declared in java code snippets, and i want to use those same variables in the JSTL tags.
We have some code like this
<%int idealType = 0;
if (dealType != null) idealType = Integer.parseInt(dealType);
I want to use the idealType variable in my JSTL tag.
Ex: <c:if test="${idealType == 17}">
Is there any way that i can access the variable idealType in the JSTL tag.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic