WebSphere Portal 5.1 + AJAX
We have the following issue with Ajax in WebSphere Portal 5.1 Environment.
We have working web application which consists of Business EAR project (EJB 2.1 project) and Portlet JSR 168 project (Faces Portlet project).
These projects communicate by means of RMI calls (ejb session beans used). In our case Portal and AS are installed on the one phisical PC
(so JNDI_PROVIDER=corbaloc:iiop:localhost:2809 used). During beans lookup we use simplest authenticating method - username for
SECURITY_PRINCIPAL environment property.
When we try to get some information from business via call from some portlet - everithng OK (session bean getSessionContext().getCallerPrincipal().getName() returns correct UserName). But when we try call session bean from ajax servlet on which JS reference variable points, we get UNAUTHENTICATED caller.
Does anybody have any comments on the issue?
Thank you in advance.
Re: WebSphere Portal 5.1 + AJAX
I had a similar problem, and I think I solved it by first saving the
login user name from portlet to HttpSession. Using:
HttpSession sess =
sess.setAttribute(BEAN_NAME, abean); // maybe for you, abean is
Then you can just get the bean from your servlet.
I know it's not an elegant approach, but at least it solved it for
If anyone know a better alternative, I'd like to know it too..