I want a solution, MY problem is i have to show one pdf file.And when i save this file it should be save by a name which is comming from request.getSession().getAttribute(Constants.Q_NO).I used following code .It is working for all browsers except ie8. when i execute my code in ie8 and press ..pdf button, it open pdf file but when i try to save this file it save with a different name(name in my url like xyzController.pdf).I want it save with a name which is comming by a code request.getSession().getAttribute(Constants.Q_NO). So what a need to change and modify that it work for ie8 also.I read many senario for that but all are using attachment, in my senarion the requirement is different. The code is below :
response.setContentType("application/pdf");
response.setHeader("Pragma", Constants.PUBLIC);
response.setHeader("Cache-Control", Constants.PUBLIC);
response.setHeader("Content-disposition",
"filename="+ request.getSession().getAttribute(Constants.Q_NO));
System.out.println( request.getSession().getAttribute(Constants.QUOTE_NUMBER));
out.write(data);
out.flush();