I need to grab a dynamically-named variable off of the request. This works in scriptlet form, but I’d rather not clutter up the page with scriptlets.
<%
String requestValueKey = "something_" + request.getParameter("State") + "_" + request.getParameter("UUID");
String requestValue = request.getParameter(requestValueKey);
%>
I’d like to switch it to JSTL but I can’t figure out how to come up with a dynamically named session value key that relies on other values in the session.
Use
<c:set>to prepare the dynamic key and use brace notation[]to get a value by a dynamic key.Then you can get it by
${param[requestValueKey]}in remnant of the page.