Access and print HTTP request query string parameters via EL in JSP page -
i need pass request parameter 1 jsp jsp page this:
<a href="cv.jsp?type=alaacv">alaa</a>
however, when try access below, doesn't print anything.
<c:set var="selectedcv" value="${type}" scope="request" /> <c:out value="${selectedcv}" />
how caused , how can solve it?
you need access ${param}
implicit el object referring request parameter map (which map<string, string>
; if need map<string, string[]>
multi-valued parameters, use ${paramvalues}
instead).
<c:set var="selectedcv" value="${param.type}" /> <c:out value="${selectedcv}" />
the ${param.type}
resolves request.getparameter("type")
.
you can below without need <c:set>
:
<c:out value="${param.type}" />
Comments
Post a Comment