Skip to Content
Former Member
Jul 30, 2007 at 03:27 PM

Find information in the session


Post Author: stujava

CA Forum: JAVA

Hi everybody,I 'd like use this code below and I work with Java:ReportEngine boRepEng = (ReportEngine)session.getAttribute("RE");String strEntry = request.getParameter("docRef");String strImageName = request.getParameter("imageName");Image boImage = boRepEng.getImage(strEntry,strImageName);response.setContentType(boImage.getMimeType());ServletOutputStream Output = response.getOutputStream();byte[] boData = boImage.getContent();response.setContentLength(boData.length);Output.write(boData);Output.close(); But when the code is with the line "Image boImage = boRepEng.getImage(strEntry,strImageName);" I have an NullPointerException because the object boRepEng is Null. In the BO website there is this sample code but it does not work for me, I do not know how to initialize the object boRepEng because this object is not on the HttpSession. Where is it ? When can I get it ?Help me please.In Advance thank you very much