Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Data Services
Viewing all articles
Browse latest Browse all 58696

Accessing Java Session from Flex

$
0
0
Hi, I have a JSP login page to access an intranet, inside the Intranet I have a flex application, to access session info in the JSP page from my flex application i've created a remote object to get user info from the session:

<destination id="infoSesion">
<channels>
<channel ref="java-amf" />
</channels>
<adapter ref="java-object" />
<properties>
<source>pe.gob.inccusco.InfoSesion</source>
<scope>session</scope>
</properties>
</destination>

InfoSesion RO code:

package pe.gob.inccusco;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import flex.messaging.FlexContext;

public class InfoSesion
{
public String getUserInfo()
{
HttpServletRequest req = FlexContext.getHttpRequest();
HttpSession sesion = req.getSession();

....Code to get the user Info using sesion


}
}

I want to access the JSP session info from flex but the problem is that req.getSession always return a NullPointerException

what am i doing wrong?

Viewing all articles
Browse latest Browse all 58696

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>