You can use JSTL fmt
tag in Struts2. JSP EL expression searches all scopes and valueStack
in Struts2. Analogous to this for OGNL would be #attr
prefix. So, to access scoped variables, and search in all scopes you should try something like
"%{#attr.product.priceSell+ #attr.product.priceSell * #attr.rates[#attr.nr.count - 1]}"
Note, the values in the expression should not be of type String
. If you keep the values as strings, then it needs to parse them before using in the expression as a valid numbers and this better do in the action rather than in JSP.