wood burning stoves 2.0*
The moose likes Servlets and the fly likes Problem in opening multiple browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Problem in opening multiple browser" Watch "Problem in opening multiple browser" New topic

Problem in opening multiple browser

preetha gayathri

Joined: Jan 23, 2008
Posts: 18

I have an user interface(jsp page) which has option of selecting reports in excel format. I have used single servlet for processing the data.
When i click on any option for the first request, a new browser window gets opened and displays the report in excel.
When i make second request from the same jsp page to view another report, second browser is opening but with the previoua data. And also, the page becomes blank in the first browser window.

I tried adding this code as well to avoid browser caching in my servlet code

response.setHeader("Cache-Control", "no-cache");
response.setHeader("Pragma", "no-cache");
response.setDateHeader("Expires", 0);

To display the reports in excel format, i'm using this piece of code

response.setHeader("content-disposition", "inline;filename="+ report + "_" + begindate + "_" + enddate + ".xls");

But still the same problem persists. Is this the problem with the browser or any other?
Please suggest
I agree. Here's the link: http://aspose.com/file-tools
subject: Problem in opening multiple browser
Similar Threads
Serving Excel Content
Opening excel sheet separately
I am getting old file from the server
Dynamic jasperReport on Single jsp
can we export the data from jsp page to a excel sheet with out a database hit