How can servlet return data as download file from browser ? !!! URGENT !!!

My servlet query data from database and would like to return the data as text file.
How can I return data to the browser as user click a file to download ?
How can I set the file name ? (default name is the servlet name that I don't want it to be)
Which content type should I return to browser to prevent browser to display data immediately but save instead ?
Thank you very much !

I am having the same issue. Did you ever discover a way to change the "file name" in the browser. I've tried changing numerous HTTP header fields, to no avail.
Marc

Similar Messages

  • How can I get data in flat file from Pool table and cluster table ?

    Hi,
    I am working in one Achiving project. My requirement is to get data into flat file from Cluster table and pool table.
    Is there any tool avilable to download data into flat file from pool table and cluster table ?
    if table name given in the selection screen then data will be downloaded into flat file.
    waiting for quick response.
    Best Regards,
    Bansidhar

    Data cannot be retrived directly form the cluster table
    as the Cluster results are stored in Cluster Key say for example PCLkey
    and form that Key we need to fetch the data
    these clustes are not the part of PNP or PNPCE tables
    for ur info kindly check

  • HT1382 how can I restore my back up files from my laptop? i want to see the dates and time that I backed up  my files. is it posssible?

    how can I restore my back up files from my laptop? i want to see the dates and time that I backed up  my files. is it posssible?

    What backed up files?
    Available backups for an iOS device can be found in Edit > Preferences > Devices.

  • How can my laptop access the downloaded files like mp3 and pdf documents which are in my iphone 4G?

    how can my laptop access the downloaded files like mp3 and pdf documents which are in my iphone?

    Yes you will need to NAT at some point to go from private to public address space. Here is a basic configuration if you are interested:
    interface F8
    ip nat inside
    interface G0
    ip nat outside
    ip access-list standard NAT
     permit 192.168.11.0 0.0.0.255
    ip nat inside source list NAT interface G0 overload

  • HT4623 How can I save the update download file as I have several devises to upgrade and cant afford the bandwidth to do each via iTunes

    How can I save the update download file as I have several devises to upgrade and cant afford the bandwidth to do each via iTunes.
    There does not appeare to be any doenloadable files in the download section.

    "Well that's totally unacceptable."
    Actually you can only accept it, as it is the way it is.  You may not like it, but it is so.  Sorry.
    " your seriously telling me that Apple expect me to download the same huge file 8 TIMES"
    That is exactly what I am telling you.
    " No way."
    Still true.
    "Apple are going to have to come up with another solution."
    No.  They do not have to do any such thing.  They may choose to do so in the future, but there is no reason to believe that they will.

  • How can I transfer all of the files from my old iPhone 4S to my new iPhone 5?

    how can I transfer all of the files from my old iPone 4S to my new iPhone 5?

    Download the media content from an iTunes library or the iTunes Store, and follow these instructions to transfer your personal settings and data.
    (83108)

  • How can I clean all the junk files from my iMac so that it can run faster?

    How can I clean all the junk files from my iMac so that it can run faster? Its been slowing down ever since I started using it.

    Before doing anything, we might be able to help with your iMac issues here.
    Please download, install and run Etrecheck.
    http://www.etresoft.com/etrecheck
    Copy/paste its report here in another reply thread so that we have a complete profile of your Mac's hardware and installed software.

  • How can i export a 24bit avi file from photoshop for mac?

    how can i export a 24bit avi file from photoshop for mac? i have a client that specificly needs the files to be avi and in 24bit what are the settings that i need to use to export the video using photoshop on a mac?

    Hello,
      To make a 24-bit AVI file in Photoshop, go to File>Export>Render Video. Then, under File Options, choose AVI from the Quicktime Export drop-down menu. Click the Settings button. Click the Settings button in the AVI Settings window. Change Compression to None, and then choose "Millions of Colors" from the Depth drop-down under Compression.
      The Millions of Colors option is for 24-bit video (8-bit R+G+B channels, 8x3=24). Millions of Colors+ is for 32-bit video (24-bit video plus an 8-bit alpha channel).
    -Brett

  • How can I copy programs (iWorks) and files from Time Capsule to my HD manually? The problem is that the migration assistant does not recognize my backup file and the user on the TC. (If I open the TC on finder, it it there though)

    How can I copy programs (iWorks) and files from Time Capsule to my HD manually? The problem is that the migration assistant does not recognize my backup file and the user on the TC. (If I open the TC on finder, it it there though)

    How can I copy programs (iWorks) and files from Time Capsule to my HD manually? The problem is that the migration assistant does not recognize my backup file and the user on the TC. (If I open the TC on finder, it it there though)

  • How can i transfer the radio recording files from my Ipad to Computer

    how can i transfer the radio recording files from my Ipad to Computer ?

    I was hopeful I could use home sharing to sync my iTunes libraries,
    Unfortunately, you can only stream content to your iOS devices via home sharing (not sync it).
    I'd have a check through the following user tip instead:
    Recovering your iTunes library from your iPod or iOS device

  • How can I keep my RAW photo files from converting to JPEG???

    How can I keep my RAW photo files from converting to JPEG???

    Hello briggiebunny
    If iTunes can read the movie files, then you will need to create an iPad version by going to the drop down menu File > Create New Version > Create iPad or Apple TV Version and then syncing that newly created file.
    iTunes: Videos may be unable to sync to iPhone, iPad, or iPod
    http://support.apple.com/kb/ts1497
    Regards,
    -Norm G.

  • How can I transfer all my downloaded music from my I phone to my computer, even music that is not purchased but is from CDs

    How can I transfer all my downloaded music from my I phone to my computer, even music that is not purchased but is from CDs

    There's some third party applications available for recovering content off an iPod, iPhone or iPad. The following article is pretty old (2008) so it would be best to reality-check the capabilities and availability of the various listed items prior to opting for a particular product:
    http://www.ilounge.com/index.php/articles/comments/copying-music-from-ipod-to-co mputer/P2

  • How can i make sure the graphic file from my subcontract create is really llegal?

    how can i make sure the graphic file from my subcontract create is really llegal?
    They have creat the PNG file which creat from Adobe Illustrator CS5.
    I have try checking on Metadata In Adobe Bridge, and it seem to be blank.
    So i would likt to know how can i make sure the graphic file from my subcontract create is really llegal?
    Thanks

    I have try checking on Metadata In Adobe Bridge, and it seem to be blank.
    So i would likt to know how can i make sure the graphic file from my subcontract create is really llegal?
    shoo: if i had to do that for every file i get  i would go insane, as scott said, post contract: files that they (sub contractor) supply you, presume them ok unless you KNOW otherwise, or a copyright flag pops up contradicting ownership.
    G

  • How can I return my iPhone4 to OS6 from OS7?

    How can I return my iPhone4 to OS6 from OS7?

    Several people on this discussion board have bought old phones that had not yet been updated and sold their updated phones.

  • HT4007 I have just transferred all my raw, jpeg & tiff files into LR4 and using to opportunity to delete old raw files to free up disc space. How can i completely remove a raw file from my msc disc??

    I have just transferred all my raw, jpeg & tiff files into LR4 and using the  opportunity to delete old raw files to free up disc space. How can i completely remove a raw file from my mac disc??

    I'd be careful here: LR references files. It can copy them, like from an SD card to your hard drive, but it doesn't necessarily make duplicates. So when you say you "transferred" those files "into" LR it just means you referenced existing files. And if you delete those they're gone, unless you've made copies. LR does not import files by copying them into a managed library like Aperture does.

Maybe you are looking for

  • Installing RAM, 3gb works fine, 4gb wont boot.

    I am trying to upgrade the RAM in an aluminium 24" iMac. I have 2x2gb sticks, both DDR2-800 PC2-6400. When I install them both, the computer wont boot. If I install just one new stick, and leave the original stick in there, it boots fine. If I instal

  • Price list creation

    Hi All I'm trying to create a price list in CRM using this link  Price List - Conditions - SAP Library but when I process the list the prices columns against the product is blank. We have requirement for price lists in TPM . Condition records for pro

  • Many of My Places silently updated by iPhoto to New Place

    iPhoto 8.0.4 silently changed 49 of the names I had defined in My Places and they are now all called New Place. The location of the pin of each of the 49 places has not been altered by iPhoto and I will be able to use Manage My Places to edit the nam

  • Color distortion

    does elements9 have focal black and white or color? where I can just focus on the color of one item(s) or change color of certain items(s). if so how do I use this?

  • Real quick question on a game problem

    alright the loop works but how can i make it so that the number of sticks are decreased every time i choose a number of sticks to be taken and then the program will continue until all the sticks are finished with. I hope u got what I was sayin For Ex