title: Get current user in Liferay using java code
body: <p>How can I get the current Liferay user in java:</p>
  
  <p>I found this:
  <a href="https://stackoverflow.com/questions/10523382/how-can-i-get-the-current-user-in-liferay">How can I get the current user in Liferay?</a>
  and this:
  <a href="https://stackoverflow.com/questions/10448193/get-the-current-user-liferay-using-a-simple-java-code">Get the current user Liferay using a simple Java code</a></p>
  
  <p>But anyone tells how to initialize a "request"</p>
  
  <p>even this document <a href="http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/understanding-the-two-phases-of-portlet-execution" rel="nofollow noreferrer">http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/understanding-the-two-phases-of-portlet-execution</a> seems to be complicated</p>