a.valchev a.valchev - 8 months ago 58
Java Question

JSP - Why does request.getParameter("...") is not evaluated in <c:out> tag

Why request object

method does not work like

Does not work

<c:out value="${request.getParameter('term')}" />


<c:out value="${param.term}" />

What is the difference? Why the request object is not accessible?

Answer Source

request is implicitly available in JSP, and it's HttpServletRequest. It doesn't work because your expression can't be evaluated. param is different key used by EL to evaluate parameters from URL.