I want to print the two values by using single jsp expression tag is it possible?
<% int a=5;
int b=10;
int c=a+b;
%>
The values of a,b and c are: <%=a,b,c%>
I have to individually write jsp expression for each variables or the above code is correct.. in jsp.
Thanks..
You’d need to String-concatenate them.
Or display them individually.
Note that what you’re doing is an oldschool way of using JSPs. Consider using EL.
Update as per the comments, you seem to now want print the comma at all, in contrary to what you initially presented in the question, here are the examples in the same order without printing the comma: