EL(Expression Language) param and paramValues

If this post was helpful to you, please leave a comment. :) Thank you!

[EL Implict Object : param]

[form.html]
<form action="result.jsp" method="post">
    Name: <input type="text" name="id"><br>
    Pass: <input type="password" name="pw"><br>
    Comt: <input type="text" name="comt"><br>
    <input type="submit" value="submit">
</form>
Name:
Pass:
Comt:


[result.jsp]
<body>
EL param : ${param}<br>
EL param.id : ${param.id}<br>
<br>
Request : <%=request.getParameter("id")%>
</body>
EL param : {pw=password, id=jsp, comt=comment}
EL param.id : jsp
Request : jsp

param of EL implict object is request.getParameter().


[EL Implict Object : paramValues]

[form.html]
<form action="result.jsp" method="post">
    Name: <input type="text" name="input" placeholder="jsp"><br>
    Pass: <input type="password" name="input" placeholder="password"><br>
    Comt: <input type="text" name="input" placeholder="comment"><br>
    <input type="submit" value="submit">
</form>
Name:
Pass:
Comt:

[result.jsp]
<body>
EL paramValues : ${paramValues}<br>
EL paramValues.input : ${paramValues.input}<br>
EL paramValues.input[0] : ${paramValues.input[0]}<br>
EL paramValues.input[2] : ${paramValues.input[2]}<br>
<br>
input[0] : <%=(request.getParameterValues("input"))[0]%><br>
input[1] : <%=(request.getParameterValues("input"))[2]%><br>
</body>
EL paramValues : {input=[Ljava.lang.String;@561aabcd}
EL paramValues.input : [Ljava.lang.String;@135efb9 < reference String[] input
EL paramValues.input[0] : jsp < input[0] value
EL paramValues.input[2] : comment < input[2] value

input[0] : jsp
input[1] : comment

paramValues of EL implict object is request.getParameterValues().

Comments