?
Solved

JXL JSP EXCEL MULTIPLE INSTANCES

Posted on 2007-07-23
2
Medium Priority
?
735 Views
Last Modified: 2013-11-24
I am currently using jexcel api 2.6.4 to output a database query to an excel file from a jsp webpage.  From a jsp file, I call a java class that does the following:
      response.setContentType("application/vnd.ms-excel");
      response.setHeader ("Content-Disposition", "attachment;filename=fileName");

     ServletOutputStream sos = response.getOutputStream();
      FileInputStream file = new FileInputStream(theFile);
and I plug the input stream to the servlet output stream.  I need a user to be able to run multiple searches and produce different excel worksheets but the problem is that if a user has a previously generated output file open, running the webpage search again just throws focus to that previously generated report.  What's going on?
0
Comment
Question by:mynus482
2 Comments
 
LVL 92

Accepted Solution

by:
objects earned 1500 total points
ID: 19552411
sounds like its caching the result.
try adding a dummy arg with a unique vale (such as a timestamp) to the url
0
 

Author Comment

by:mynus482
ID: 19556905
Actually, when I was creating the excel file, I was using a hardcoded name for it.  Appending a random string to differentiate each file fixed the problem. Thanks.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question