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?
<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?