Of cause PortletSession is available only inside of J2. But APPLICATION_SCOPE 
actually refers to the same session as application outside of J2.

In my applications I use something like:
if (session instanceof PortletSession) {
    PortletSession porteltSession = (PortletSession)session;
    ....
} else {
    ....
}
This si actuallyu rear case when you need to execute the same code inside 
portlet and as a standalone webapp.

Akshay Ahooja <[EMAIL PROTECTED]> wrote: Hi,

Yeah I realized that the servlet context wont work out in this case.

As for the Portlet Session in APPLICATION_SCOPE - Isn't that only applicable
to all portlets inside J2 and not to applications outside of J2?

If not - How are you casting in: PortletSession portletSession =
(PortletSession)session;
Is session from httprequest (request.getSession() ) or from portlet request?


And when you call it outside of J2 it would have to be using httprequest (
session.getAttribute ("a"); where session is request.getSession())

Thanks,

Akshay


                
---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.  Great rates 
starting at 1ยข/min.

Reply via email to