Hi to all,
 i'm having a problem with IE8 where i can't retrieve session. my code
basically calls a rpc to store a String[][] object into session and
onSuccess it will call a HttpServlet to generate a jasper PDF.
The following is my code and it works fine in both hosted mode and
firefox but not IE8. Can anyone please tell me what seems to be the
problem?

/**
* Class extends com.google.gwt.user.server.rpc.RemoteServiceServlet
* Store String[][] into session
**/
public void storeReport(String[][] data) {
                getThreadLocalRequest().getSession().setAttribute
("medicalReportData", data);
}

/**
* RPC call to store String[][] into session
* onSuccess call a HttpServlet to generate jasper PDF
**/
MedicalStoreRemote.Util.getInstance().storeReport(data, new
AsyncCallback() {
   public void onSuccess(Object result) {
        String moduleRelativeURL = GWT.getModuleBaseURL();
        moduleRelativeURL += (moduleRelativeURL.equals("")) ? "/
MedicalReportServlet" : "MedicalReportServlet";
        com.google.gwt.user.client.Window.open(moduleRelativeURL, "Report",
"");
   }

   public void onFailure(Throwable caught) {
        System.out.println("Store medical report data failed");
        caught.printStackTrace();
  }
});

/**
* Get session data and create jasper pdf
* >>>in IE8 the session always return null<<<
**/
public void service(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
        String[][] data = (String[][])req.getSession().getAttribute
("medicalReportData");
        if(data ==null){
           ServletOutputStream os = resp.getOutputStream();
           os.write("DATA IS NULL".getBytes());
           os.flush();
           os.close();
           return;
        }
        createReport(data, resp);
}
private void createReport(String[][] data, HttpServletResponse
responese)throws ServletException{
//Create JASPER PDF
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to