掲示板

Accessing liferay api from a JSP

12年前 に Vasanth Jayabalan によって更新されました。

Accessing liferay api from a JSP

New Member 投稿: 24 参加年月日: 11/02/25 最新の投稿
Hello,

Is it possible to access the liferay API from outside the portlet container, like from a standalone JSP? I want to get the liferay logged in user's credentials from a standalone JSP, but couldn't think of a good way to do this. I am not going through any portlets. Any help would be appreciated.

thanks,
Vasanth
thumbnail
12年前 に Ronak Patel によって更新されました。

RE: Accessing liferay api from a JSP

New Member 投稿: 19 参加年月日: 10/01/20 最新の投稿
Hi Vasanth,
Do you want to get the details of all currently logged in users for some monitoring / audit trail functionality? because there can be many concurrent session in 1 server at any time.
So please provide more information on the requirement.

Thanks,
Ronak
thumbnail
12年前 に Hitoshi Ozawa によって更新されました。

RE: Accessing liferay api from a JSP

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
If your question if about accessing json, rmi, or web service from jsp, it's probably better to ask in some jsp forum at some other numerous
java sites.
12年前 に Vasanth Jayabalan によって更新されました。

RE: Accessing liferay api from a JSP

New Member 投稿: 24 参加年月日: 11/02/25 最新の投稿
Nope...that's not what my question means. I want to know if I can access the liferay objects like ThemeDisplay, User, etc. (can't think of more now emoticon). I am trying to redirect the default landing page from /web/guest/home to another JSP. I want to access the logged in user's roles and permissions from this redirected JSP. However I am unable to do so. The JSP doesn't recognize the portlet objects created using the Theme and Portlet tag libraries. This makes sense because the JSP could be running in a totally different application (different context) and not know anything about liferay. So I was looking for some static liferay methods to access liferay specific information from the JSP. I came across some great service classes like UserLocalServiceImpl and RoleServiceImpl that seem to solve my problem.