0

I'd like to check values of a request parameter in EL.

Supposing to have an url like page.jsp?par1=test I've tried something like:

<c:if test='{"test".equals(par1)} >
    [...]
</c:if>

But I've had no success.

So, how can I access a request parameter in EL?

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Alessandro
  • 4,382
  • 8
  • 36
  • 70

1 Answers1

1

Try something like this :

<c:set var="test" value="yourValue"/>
<c:if test="${test==param.par1}">
  do what you want
</c:if>
akuma8
  • 4,160
  • 5
  • 46
  • 82