Search code examples
jspjstlel

Confused about jsp:param and scopes with JSTL


I'm including a "child" JSP in a "parent" JSP with jsp:include and jsp:param. I have a jsp:parameter parameter with name="test", value="testValue"

*c:out value="${test}"* does not display anything (it's blank). Only displays "testValue".

Why so ? The official docs say that jsp:param add values to the request scope. c:out is supposed to look at every scope (from narrow (page) to broader (application)). Surely I must have missed something else ?


Solution

  • My bad, I didn't read the docs right, actually...the docs say it adds a parameter to the URL; scopes are attributes.

    Confused about jsp:param and scopes with JSTL