且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Liferay:如何在Servlet中获取当前的登录用户详细信息?

更新时间:2023-12-04 09:03:46

一种方法是将其显式传递给send操作的URL,例如:

One way is to explicitly pass it to the URL of the send action, for example:

uri = ".../FormData?username={xxf:get-request-header('Orbeon-Username')}"

在Orbeon Forms 4.9中,有一个新的 xxf:username() 功能更直接.

In Orbeon Forms 4.9, there is a new xxf:username() function which is more direct.

在Servlet端,您可以使用以下方法检索URL参数:

On the servlet side, you can retrieve a URL parameter using:

request.getParameter("username")