Getting the request parameter

I always forget how to do this so I thought I should write it down.

In JSP:

<%=request.getParameter("foo")%>
<img src="<%=request.getParameter("foo")%>">

In JSTL:

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

In DSP:

<dspel:valueof param="foo"/>

Leave a Reply

Your email address will not be published. Required fields are marked *