from flex i must set un Object ActionScript into session Servlet, and from java i must retrive this object .
if you can help, to me throws always "ava.lang.NullPointerException"
Bye Devis
Java side
// HttpSession session = flashgateway.Gateway.getHttpRequest().getSession(false);
HttpSession session = flashgateway.Gateway.getHttpRequest().getSession(true);
PfVO vo =(PfVO)session.getAttribute("vopf");
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" backgroundColor="#FFFFFF" height="80%" width="80%">
<mx:RemoteObject id="servlet" source="servlet"/>
<mx:Script> <![CDATA[
import mx.controls.Alert; import vo.as400.*; var vopf:PfVO;
function genPDF() {
vopf=new PfVO();
vopf.de50pf="Balsemin";
vopf.stagione.cdc_stag="1995";
vopf.strepf="A";
servlet.session("set",vopf);var pdf_url = "/test/view/JavaPdf.pdf"; getURL(pdf_url,'_blank');
}
]]> </mx:Script>
<mx:Panel title="Printing to a pdf" height="100%" width="100%">
<mx:Label text="Enter some below and then press the print button." width="100%"/>
<mx:TextInput id="t1" text="Enter some text here!" width="80%"/>
<mx:ControlBar> <mx:Button label="Print" click="genPDF()"/> </mx:ControlBar>
</mx:Panel>
</mx:Applicatio

