RE: which jsonws api to get all users list  by group Id and company Id

thumbnail
Ramalingaiah. D, modified 6 Years ago. Expert Posts: 489 Join Date: 8/16/14 Recent Posts
Hi ,

which jsonws api to get all users list  by group Id and company Id or I want to display users list on portlet jsp page ,
i am using liferay 7.1 

i did code 


[code]<%@page import="java.util.ArrayList"%>
<%@page import="javax.portlet.RenderRequest"%>
<%@page import="com.liferay.portal.model.User"%>
<%@page import="javax.portlet.PortletSession"%>

<%
    RenderRequest renderRequest = 
        (RenderRequest) request.getAttribute("javax.portlet.request");
    PortletSession session = renderRequest.getPortletSession();
    List<user> users = (List<user>) session.getAttribute("users");

    if(users != null){
        for(User user : users){
%&gt;
            <b>Name: </b>&lt;%=user.getLastName() + ", " + user.getFirstName() %&gt;<br>
        &lt;%}
    }%&gt; </user></user>


it is not working 
​​​​​​​please help out me 


Thank you
Ram
thumbnail
Amos Fong, modified 6 Years ago. Liferay Legend Posts: 2047 Join Date: 10/7/08 Recent Posts
You can see a list of jsonws api's at http://localhost/api/jsonws

Is this jsp in a Liferay module? I think you may want to do a local call instead to UserLocalServiceUtil?