Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can we combine java code with JSTL  RSS feed

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
Boost this thread!