a.valchev a.valchev - 1 year ago 81
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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download