On May 3, 2004, at 1:16 AM, Anand Kumar Kalyanasundaram wrote:


Hi,
I have an applet in a velocity portlet that needs
to talk back to a servlet for additional processing. When
the applet does a HttpURLConnection to the servlet, the
servlet somehow seems to pickup the correct session (tomcat
version 4.1). I.e. The session id got by
"$data.getSession().getId()" in the velocity template is
the same as "request.getSession().getId()" in the servlet.
Please correct me if I am wrong here.


My problem is, I am unable to retrieve the JetspeedUser
in the servlet.

The following code in the servlet returns null for
JetspeedUser :

    HttpSession session=request.getSession();
    System.out.println("\n SessionId="+session.getId());

    RunData data = RunDataFactory.getRunData(request,
                      response,
                      getServletConfig());

    JetspeedUser user =
           ((JetspeedRunData)data).getJetspeedUser();

// user is null

How are you going to get RunData from a non-Turbine servlet.
Think about it. That makes absolutely no sense.
RunData is created by Turbine for each request invocation and is only valid for the duration of that request.


Is there another way to retrieve JetspeedUser ? Thanks in
advance for any possible help.

If you want to get the current logged on user, go to the session.


-- David Sean Taylor Bluesunrise Software [EMAIL PROTECTED] [office] +01 707 773-4646 [mobile] +01 707 529 9194



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to