java - Using OGNL to get parameters -
in 1 jsp page, including jsp page , passing parameter:
<jsp:include page="/web-inf/somepage.jsp" flush="true"> <jsp:param name="location" value="menu"/> </jsp:include>
in included page, can access parameter using el. works:
${param.location}
but cannot use ognl equivalent same parameter. none of these work:
#parameters.location #parameters['location'] %{#parameters.location} %{#parameters['location']}
i know there work-around using <s:set var="location">${param.location}</s:set>
or <c:set var="location">${param.location}</c:set>
, using ognl: #location
want avoid that. don't want use scriptlets either.
struts2 equivalent include tag <s:include
that's should replace in code, apply <s:param
parametrize it.
<s:include value="/web-inf/somepage.jsp"> <s:param name="location" value="menu"/> </s:include>
after can use ognl.
Comments
Post a Comment