[英]Convert jsp code to el
I have the following code in my jsp 我的jsp中有以下代码
var chart_json${suffix} = <%=request.getAttribute("chart_json" + request.getAttribute("suffix"))%>; var chart_json $ {suffix} = <%= request.getAttribute(“ chart_json” + request.getAttribute(“ suffix”))%> ;;
Is there any way to convert the code <%=request.getAttribute("chart_json" + request.getAttribute("suffix"))%>; 有什么方法可以转换代码<%= request.getAttribute(“ chart_json” + request.getAttribute(“ suffix”))%>; To el expression ?
为了表达? I know that I can change the structure in the server side (like convert the value to map) however I am looking to a quick solution Thanks
我知道我可以在服务器端更改结构(例如将值转换为映射),但是我正在寻找快速解决方案
您可以尝试以下一种表达方式:
#{request.getAttribute('chart_json'.concat(request.getAttribute('suffix')))}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.