0

A default startup Spring MVC with Apache Tiles application has a list of predefined tagx files. I find a variable ${param} is used everywhere but couldn't find there it defined and initiated, please anyone can give a hint about where does it come from? Thanks

For example, from language.tagx:

<jsp:directive.attribute name="locale" type="java.lang.String" required="true" rtexprvalue="true" description="The locale for the language to be added." />
<jsp:directive.attribute name="label" type="java.lang.String" required="true" rtexprvalue="true" description="The country label for the language to be added." />
<jsp:directive.attribute name="render" type="java.lang.Boolean" required="false" rtexprvalue="true" description="Indicate if the contents of this tag and all enclosed tags should be rendered (default 'true')" />

<c:if test="${empty render or render}">
<spring:url var="img" value="/images/${locale}.png" />
<spring:url var="url" value="">
  <c:if test="${null ne param.form}">
    <spring:param name="form" value="1" />
  </c:if>
  <c:if test="${not empty param.find}">
    <spring:param name="find" value="${param.find}" />
  </c:if>
  <spring:param name="lang" value="${locale}" />
  <c:if test="${not empty param.page}">
    <spring:param name="page" value="${param.page}" />
  </c:if>
  <c:if test="${not empty param.size}">
    <spring:param name="size" value="${param.size}" />
  </c:if>
</spring:url>
<spring:message code="global_language_switch" arguments="${label}" var="lang_label" htmlEscape="false" />
<a href="${url}" title="${fn:escapeXml(lang_label)}">
  <img class="flag" src="${fn:escapeXml(img)}" alt="${fn:escapeXml(lang_label)}" />
</a>
<c:out value=" " />
</c:if>
1
  • Where is the example? Commented Mar 5, 2013 at 20:01

1 Answer 1

2

param is an implicit object provided by the Unified Expression Language. It allows you to access the values of request parameters.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you. So can we confirm that the ${param} is mainly used to pass variables from previous request and better not to fill in customized data?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.