Passing json data from one jsp to another in Liferay -
i new liferay , ended failing send data 1 jsp other. below use case.
- i have created 2 jsp files: first.jsp , second.jsp
- i have created href in first.jsp , on clicking of that, loading second.jsp calling renderurl.
- all want achieve constructing json data in first.jsp , when click href tag, need pass json data second.jsp file.
any pointers on how achieve task appreciated?
thanks.
i able send data creating renderurl in javascript code show below. posting might me out there :)
in first.jsp:-
<script> aui().ready('liferay-portlet-url', function(a) { var renderurl = liferay.portleturl.createrenderurl(); renderurl.setparameter("jsppage","/html/testsample/testsamplepage.jsp"); renderurl.setportletid("testsamplepage_war_testsamplepageportlet"); renderurl.setparameter("rowdata",data); window.location.href = renderurl; </script>
then in second.jsp:-
<% system.out.println(request.getparameter("rowdata")); %>
Comments
Post a Comment