473,378 Members | 1,393 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Is this possible?

Firstly sorry for cross posting but not really sure which group this belongs
in?

Anyway, I have a webapp that basically consists of 2 screens, search critera
& results

I want to be able to provide a way for the user to download a zipped up
excel file of the results.

I can quite easily create a excel file using POI & zip it up using
java.util.zip which creates a zip file on the server. Then add a link to
this file on the results page which when clicked will produce the standard
download dialog box & alls well.

The problem is I have to create the zip file every time the results
generated & displayed but some users might not want this faclity!

Is it possible to have a button/link etc... that when clicked create's the
zip file & produces the download dialog box WITHOUT changing the results
page?

Any ideas?

thanks

harry
Jul 17 '05 #1
1 1655
yes

simply have the download URL pointing to a servlet (or whatever server side
technology you are using)

in the servlet build the zip file, set the content-type to
application/x-zip-compressed and write out the zip data as the HTTP body.

note that you with java.util.zip, you can simply open up a zipOutputStream
on the response's output stream so you don't need to save it to a file at
all.

I would also suggest the url ends in .zip as well. Sometimes IE seems to
look at the file extension of the URL as well as the content type

Andy

"Harry" <a@abc.com> wrote in message
news:WW*********************@news-text.cableinet.net...
Firstly sorry for cross posting but not really sure which group this belongs in?

Anyway, I have a webapp that basically consists of 2 screens, search critera & results

I want to be able to provide a way for the user to download a zipped up
excel file of the results.

I can quite easily create a excel file using POI & zip it up using
java.util.zip which creates a zip file on the server. Then add a link to
this file on the results page which when clicked will produce the standard
download dialog box & alls well.

The problem is I have to create the zip file every time the results
generated & displayed but some users might not want this faclity!

Is it possible to have a button/link etc... that when clicked create's the
zip file & produces the download dialog box WITHOUT changing the results
page?

Any ideas?

thanks

harry

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Julia Briggs | last post by:
I am struggling to create a PHP function that would take a specified image (JPG, GIF or PNG) from a link, and resize it down to a thumbnail so it will always fit in a 200x250 space. I am hoping...
36
by: rbt | last post by:
Say I have a list that has 3 letters in it: I want to print all the possible 4 digit combinations of those 3 letters: 4^3 = 64 aaaa
20
by: CHIN | last post by:
Hi all.. here s my problem ( maybe some of you saw me on other groups, but i cant find the solution !! ) I have to upload a file to an external site, so, i made a .vbs file , that logins to...
7
by: Andrzej | last post by:
Is it possible to call a function which name is given by a string? Let assume that I created a program which call some functions for example void f1(void), void f2(void), void f3(void). ...
2
by: Bhupesh Naik | last post by:
This is a query regarding my problem to make a spell and grammar check possible in text area of a web page. We have aspx pages which are used to construct letters. The browser based screens...
1
by: AAA | last post by:
hi, I'll explain fastly the program that i'm doing.. the computer asks me to enter the cardinal of a set X ( called "dimX" type integer)where X is a table of one dimension and then to fill it...
25
by: Piotr Nowak | last post by:
Hi, Say i have a server process which listens for some changes in database. When a change occurs i want to refresh my page in browser by notyfinig it. I do not want to refresh my page i.e....
4
by: RSH | last post by:
Okay my math skills aren't waht they used to be... With that being said what Im trying to do is create a matrix that given x number of columns, and y number of possible values i want to generate...
7
by: Robert S. | last post by:
Searching some time now for documents on this but still did not find anything about it: Is it possible to replace the entry screen of MS Office Access 2007 - that one presenting that default...
14
by: bjorklund.emil | last post by:
Hello pythonistas. I'm a newbie to pretty much both programming and Python. I have a task that involves writing a test script for every possible combination of preference settings for a software...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.