0

What is the equivalent to the following ATG DSP code:

<dsp:getvalueof var="age" param="customerAge" scope="request" />

Is it

Object age = request.getParameter("customerAge")?

thanks

pinker
  • 1,283
  • 2
  • 15
  • 32

1 Answers1

2

Unlike request attributes, request parameters are always strings, so that should technically be:

String age = request.getParameter("customerAge");

But in JSP its advisable not to use scriptlets, so using EL you would do it like:

<c:set var="age" value="${param.customerAge}" scope="request" /> 
developerwjk
  • 8,619
  • 2
  • 17
  • 33