HI Bryant,
> I'm trying to get the current user in a popup which is initiated by
> a custom
> button on the EditLive button menu. The popup is otherwise working
> well
> except that when I use request.getUserPrincipal it always comes back
> null. I
> noticed that the EditLiveJavaEditor.jsp is getting the user. Is this
> stored
> in a bean or some other way that I can get access to it?
Sadly, achieving this is disturbingly difficult. When
EditLiveJavaEditor.jsp is included, it's part of a Portlet so it uses
the Portal authentication and user principal. However, when you send
a request directly to a JSP file, it's a servlet with default
configuration (and thus no security requirements). As such, you don't
get a user principal.
WebSphere experts may know a simpler way to achieve this, but the only
way to make it work that I know is to deploy your custom JSPs in a
separate EAR file which contains a single WAR with a webapp.xml that
requires security. I believe the EAR needs some configuration to map
the security role within the WAR to the groups that Portal uses but I
can't recall the details.
There are a lot of improvements and AJAX support added in Portal 6.1
which I'm not familiar with yet (Ephox still supports 6.0 so they're
off-limits in everything we do). If you're on Portal 6.1, it's
probably worth investigating those or asking on the Portal support
forums.
Regards,
Adrian Sutton.
______________________
Adrian Sutton, CTO
UK: +44 1 628 353 032 US: +1 (650) 292 9659 x717
Ephox
http://www.ephox.com/Ephox Blogs
http://planet.ephox.com/, Personal Blog
http://www.symphonious.net/_______________________________________________
[hidden email]
List instructions at
http://liveworks.ephox.com/mailing-list/