Using Liferay Util Param
The param tag lets you set a parameter for an included JSP page. This configuration requires two JSPs. JSP A, the main view of the app, includes JSP B and sets its parameter value. This lets you dynamically set content when you include the JSP.
For example, say you have your main functionality in my-app.jsp
, and you have additional functionality provided by more-content.jsp
. You could have the example configuration shown below:
more-content.jsp
:
Then in my-app.jsp
, you can include more-content.jsp
and set the value of the answer
parameter:
This results in the following output in my-app.jsp
:
Now you know how to use the <liferay-util:param>
tag to set parameters for included JSPs. You can use this approach to include common reusable pieces of code in your apps.