Reputation: 61
Hello i am a new in world of liferay
.
i have a form that passes emailaddress via ajax request to serveResource
method of my portlet
.
on the basis of of that email address i have to search the corresponding user in liferay
database and pass the User object as response back to my JSP page. How do i do that?
How to pass an object as response, from serveResource
method to JSP page?
help me.
Upvotes: 1
Views: 937
Reputation: 18807
Use herefor the methode like writeJSON(resourceRequest, resourceResponse, json);
See the full example at liferay source code: https://github.com/amusarra/liferay-aui-autocomplete-ajax-example/blob/master/src/main/java/it/dontesta/liferay/portlet/ViewAUIAutocompleteAjax.java
Upvotes: 1