Setting SearchContainer in portlet to use it in JSP using EL and JSTL

放肆的年华 提交于 2019-12-04 05:29:38
Prakash K

Converting comments to answer:

  1. Whenever you render a portlet it is rendered through the doView method and not directly through the action methods as part of the portlet life-cycle.
  2. the results and total set as renderRequest.setAttribute("searchResults", courses) and renderRequest.setAttribute("searchTotal", total) in doView will be available in the view.jsp as ${searchResults} and ${searchTotal}.
  3. Everytime you perform any action the doView will be called after that and the searchResults and searchTotal will be set again and will be shown.
  4. or you can just set the searchContainer in the doView method itself as explained in the answer which you had linked in your question.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!