In order to access portals user management, we need the files com.sap.portal.usermanagementapi.jar and com.sap.security.api.jar in our servlets classpath. These files are part of the portal and/or Netweaver Developer Studio installation. If you can’t find them, you may try out class locator – an open source tool I consider invaluable for portal development.

Now perform the deployment cycle described in chapter III (PcdBrowser-compile.cmd -> Build WEB Archive -> Build Application Archive -> Deploy to J2EE engine). Afterwards, you can call the IView you created in chapter III and should see a screen similar to this one:

As you can see, the GWT application periodically requests data from the backend. Therefore, it can take up to ten seconds until you receive the first status line.

The most interesting part in the backend application is the part, where the portal user is determined:

So we need the HttpServletRequest and HttpServletResponse of a request in order to get the current portal user from UMFactory. Thankfully, GWT offers a possibility to retrieve these from the current thread by calling RemoteServiceServlet.getThreadLocalRequest() and RemoteServiceServlet.getThreadLocalResponse().