Problem on downloading a zip file
I am having a problem on downloading a zip file(file size is about 2Mb). Sometimes I can get a complete file and can open the file, sometimes the zip file is chunked(the file size is smaller than the right one), so I can't open it.
The file content is stored in a blob field. The code first goes to database get the blob as inputstream, then copy the inputstream into response.getOutputStream().
The problem is unpredictable. Even for the same blob data, sometimes I can get working file, sometimes I just get crapped file.
Could somebody help me out? I am struggling with it.
Any input is appreciated!
public class DownloadTextAction extends Action implements Serializable{
private static Log log = LogFactory.getLog(DownloadTextAction.class);
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response) throws Exception
ActionErrors errors = new ActionErrors();
String batch_id = (String)request.getParameter("batch_id");
String fileName = batch_id+".zip";
try
// response.setContentType("application/octet-stream");
response.setContentType("application/download");
// response.setContentLength(content.length());
// response.setHeader("Content-Disposition", "inline; filename=\""
// + fileName + "\"");
response.setHeader("Content-Disposition", "attachment; filename=\""
+ fileName + "\"");
InputStream in = untilService.getBlob(batch_id);
OutputStream out = response.getOutputStream();
FileHelper.copy(in, out);
out.flush();
in.close();
out.close();
catch (Exception e)
errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.detail", e.toString()));
saveErrors(request, errors);
log.error(e.toString());
return mapping.findForward(Constants.SUCCESS);
}
Maybe a fault in the missing FileHelper.copy() method?
Similar Messages
-
Problem in tutorial and zip file. can anyone file it or correct it..
hi jdev experts,
am using jdev11.1.1.5.0.
when am new to these webservice. i followed this tutorial
http://docs.oracle.com/cd/E18941_01/tutorials/jdtut_11r2_14/jdtut_11r2_14.html
url wsdl link when use that wsdl.
throws some error.
what is the reason john says. ok at second post of the thread.
Consuming a Web Service from a Web Page
so if i change the wsdl means and somethings has to be changed in tutorial steps.
if any newbie crossing this tutorials feels very difficult to work. so can change the wsdl url link and those steps.
and another thing I installed 11.1.2.0 and download that zip file in that tutorial and i run throws the same error.
so. problem in tutorial and zip file. can anyone file or correct..
i think think this is the right place to tell this. or else re-direct me.this is to arun.
As the exception stack clearly mentions that the endpoint is moved, it is up to the users to make use of any other webservice.trace says link is moved i know.
thing am here is:
please make note on that tutorials.
* note :- just like this consume some other external webservices. dont use this webservice this webservices link is broken.
this what saying.
this to john.
thanks. thanks again. -
No luck trying to extract .inf files from drivers downloaded as zip files
Hi,
I am trying to extract .inf files from drivers downloaded as zip files from the Toshiba website, but I'm having no luck.
I am trying to deploy images using WDS on server 2008 and need the inf files for this to succeed, does anyone have the answer to this problem.
thanks in advance.Hi
I found this tip:
Someone wrote this:
+You have to run the installer, wait for it to get to the first point where you click Next to continue, and then leave it sitting there. Go into your system's Temp and find the particular one with the installation files inside it that were extracted, then copy it someplace, go back to the installer and cancel it.+
You could also try this freeware application to extract the package:
http://www.legroom.net/software/uniextract -
When downloading a ZIP file I get a 'Launch Application' window.
In Options I have set download to ask for a location and use the download window but this does not work.
cannot find any way of changing this and there is no option for using an application.
If I down load in IE I have no problems so it must be FireFox and not a system problem.I have found the problem.
A download manager had been installed for a specific website and it was butting in all the time. Even after removing it with 'Add or remove software' it still had its hooks into the system and it was impossible to download anything as it now would not run.
Had to do an XP 'System restore' before I could get rid of it.
The offending program was MD_setup.exe size 3,045KB from the themediadownloader.com -
I downloaded a .zip file. It ate up my space and i cant find the file. How can i get this file off my phone?
Not possible. Safari won't download and save a Zip file. You either had to use a 3rd party app, or as wjosten suggests, your phone is jailbroken. If the former, you'll need to use that app to find it. If the latter, you'll have to look elsewhere for assistance.
-
Hey guys, wondering if someone could give me some help. I've downloaded a zip file from noisetrade, but it won't open on my mac.I keep clicking and it vhanges to a cgzp file..and even when I changed the end bit to zip, it won't open. I've tried the unarchive app andthat hasn't worked either...what shall I do?
Thanks in advance :-)iWork (no 's') for iOS & iWork for Mac have not gone away.
iWork.com (beta) (also no 's') is going away the end of July. iWork.com (beta) is/was an online method of sharing iWork files with other users & never moved out of beta in 3+ years. It is a completely different entity than the iWork apps & is not & never has been necessary for the iWork apps to function.
A Numbers document, as well as Pages or Keynote documents, cannot be opened on a PC. You must first export them to a file that a PC can use. For Numbers that is generally Excel. In Numbers on your iPad tap the wrench & then tap Share & Print & choose Excel as the file type.
As for transfering a file from a PC to an iPad, I'm not sure as I don't use a PC. -
I have been trying to download the zip file all day today and keep getting a "Page Cannot be displayed". Is the file available today?
Please use this forum to provide feedback about OTN content/services. All other posts will be DELETED.OS X Mavericks: Open an app from an unidentified developer
-
How to zip a folder containing subfolders with files and download the zip file in silverlght 4
private void hbtnDownloadReceipt_Click(object sender, RoutedEventArgs e)
try
string Docpath = "ClaimsDetails/" + "20tech" + "/" + PaymentAdviceUNo;
string dd = "ClaimsDetails/";
Uri uri = new Uri(Application.Current.Host.Source, "/" + Docpath);
Uri uri1 = new Uri(Application.Current.Host.Source, "/" + dd);
string path = uri.AbsoluteUri.ToString();
path1 = uri1.AbsoluteUri.ToString();
//HtmlPage.Window.Eval("window.open('" + path + "')");
catch (Exception ex)
ex.Data.Clear();
1) Here "path" is D:\\TL 24-12-2014 \\OfficeConnect_17_10\\OfficeConnect.Web\\ClaimsDetails\\20tech\\PaymentAdviceUNo.
2) In path "PaymentAdviceUNo" is the folder containing subfolders which i want to zip.
Thanks in Advance.Hi,
You can download a zip file like any files with the Webclient class, look at the details and examples in the msdn documentation for downloading content on demand it even talks about how to download and get a specific file from a zip archive.
http://msdn.microsoft.com/en-us/library/cc189021(VS.95).aspx
Besides, if you want to list the files,you could check articles below:
http://blogs.msdn.com/b/blemmon/archive/2009/11/25/reading-zip-files-from-silverlight.aspx
Best Regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
How can I fix error code 131:4? Licensing for this product stopped working. I have windows vista home edition and CS4 Design Premium. I downloaded licensing zip file for windows but I can't seem to get it to launch. Look forward to help from anyone
Steve,
I appreciate your answer. While it might work, I'm a bit hesitant to remove the other programs as a possible solution since they are all currently working.
With Acrobat 9 Pro failing with the OS 10.7 upgrade, I'm hoping that there is a less severe solution.
Since the trigger appears to be 10.7 and may have something to do with the discontinued support of Rosetta, I could be spending a few hours working on a reinstall without a change. Yes, it might work. The "might" is the part that makes me hesitate.
Is anyone else out there on OS 10.7 and running Acrobat 9 Pro? Any issues with anyone else?
Thanks Steve. I do appreciate your offering a solution. I may end up trying it if nothing else comes together.
Mark -
Finder crashed after downloading a zip file with pictures
First my desktop icons disappeared. Then the finder, appears and disappears every 3 seconds. Simultaneously the Finder also disappears and reappers in the "Force Quit Application" window. This started after I downloaded a zip file with family photos from a friend (on a windows machine). Rebooted off the Tiger installation dick. Running disk utility off the Tiger installation disk did not help. Permissions were repaired but the finder is still crashing Tried relaunching the Finder from the "Force Quit Application" window. No help. Ran Virex (outdated by 12 months) without any benefit.
Any suggestions would be appreciated.There's a shameful glitch in Finder where if you drag certain attachments off a mail document onto the Desktop the Finder will do its quit/relaunch jitter bug--will also do it for illegally named files on the Desktop, and will hang for dang near forever it you accidently drop 100s of files onto the Desktop. The easy solution is to start the affected machine in target disk mode, hook it up by firewire to another Mac, then navigate to the affected user's Desktop folder and move the funky file or files into a new folder.
Francine
Francine
Schwieder -
Downloading attached zip file from emails using safari
How to download, and where will be the downloaded attached zip file in email be stored using safari? How to open and save the zip file attached to the email? Do you need an app to open and store the zip file?
The app GoodReader (I don't know if there are any free apps that can also do it) can be used to zip and unzip email attachments
press and hold the zip file in your email - after a couple of seconds you should get a popup, with one option being 'Open in GoodReader' which you should select
GoodReader should then open with the zip file listed under My Documents
select Manage Files on the right-hand side of GoodReader, select the zip file, and touch the Unzip button that appears on the right
You should also be able to download zip files directly into GoodReader by typing the URL in its Wed Downloads sectio. -
Hi All,
Does anybody can tell me that where I can find SP05.ZIP file to download?
I need to download MDM71500_ENRICHMENT_CONTROLLER.zip file object for an enrichment scenario.
And SP05.ZIP file is not available in SMP(SP 02, 03 ,04 ZIP files and SP 05.SCA files are available in SMP).
Regards,
Nirmala.Hi Nirmala,
Since SP05 release, The Enrichment Controller isn't delivered as a ZIP file. The content is now divided. The EC deployment file is located where you suggested (in the EC application download section) and the rest of the package is delivered with MDM business content package and it contains the simulator repository and all the extra content for the Customer and Vendor repositories, in addition you can find there the sample XML and matching XSD files. if you intend to develop an adapter you'll be able to find a sample adapter as well.
Best Regards,
Ran -
Download problems with grid control zip file
Hello,
Does anyone have any insight as to why I am having problems fully downloading the first zip file for linux? I was able to download file 2 and file 3 completely without any problems but the first file always stops at around 600 MB.
I have tried three different computers.
Thanks in advance.
A/ADownloaded about 1 month ago without any problem. If it fails again, let me know. I can test it again.
-
Problems downloading DP4 zip file
Im having problems downloading the DP4 zip file. When the download ends, i cant open the zip file.
Any help?
TxsMarco,
I have not had any similar complaints and have spoken to many customers successfully using DP4. It may have been an issue on our side. Please let me know if it persists.
Doug -
Firefox won't download a zip file
There is a chat board that I belong to and they posted a zip file. It looks like a white piece of paper with a folded over corner and says zip on it. When I put my cursor over it, it kind of blows up and then says at the bottom the file name then file.Zip 260K, but I can't click on it to get it to download, save, open, reject, nothing.
I believe I have downloaded zip files in past but for some reason can't download this one.
Can someone help please.
I am running a Toshiba laptop with windows 7 service pack 1
Application Basics
Name: Firefox
Version: 25.0
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
Extensions
Name: ModPlugin
Version: 1.0.1159
Enabled: true
ID: {31d88f70-c791-42d8-8187-faaf71d42f67}
Name: AVG SafeGuard toolbar
Version: 17.0.2.13
Enabled: false
ID: avg@toolbar
Important Modified Preferences
accessibility.typeaheadfind.flashBar: 0
browser.cache.disk.capacity: 358400
browser.cache.disk.smart_size.first_run: false
browser.cache.disk.smart_size.use_old_max: false
browser.cache.disk.smart_size_cached_value: 358400
browser.places.smartBookmarksVersion: 4
browser.search.suggest.enabled: false
browser.search.useDBForOrder: true
browser.sessionstore.upgradeBackup.latestBuildID: 20131025151332
browser.startup.homepage: google.com
browser.startup.homepage_override.buildID: 20131025151332
browser.startup.homepage_override.mstone: 25.0
dom.mozApps.used: true
dom.w3c_touch_events.expose: false
extensions.lastAppVersion: 25.0
gfx.direct3d.checkDX10: false
gfx.direct3d.last_used_feature_level_idx: 1
network.cookie.prefsMigrated: true
network.protocol-handler.warn-external.dnupdate: false
places.database.lastMaintenance: 1384482032
places.history.expiration.transient_current_max_pages: 103914
plugin.disable_full_page_plugin_for_types: application/pdf
plugin.importedState: true
plugin.state.npqtplugin: 2
privacy.sanitize.migrateFx3Prefs: true
security.mixed_content.block_active_content: false
security.warn_viewing_mixed: false
storage.vacuum.last.index: 0
storage.vacuum.last.places.sqlite: 1384311247
user.js Preferences
Your profile folder contains a user.js file, which includes preferences that were not created by Firefox.
Graphics
Adapter Description: Mobile Intel(R) 4 Series Express Chipset Family
Adapter Drivers: igdumd64 igd10umd64 igdumdx32 igd10umd32
Adapter RAM: Unknown
ClearType Parameters: Gamma: 2200 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 400
Device ID: 0x2a42
Direct2D Enabled: true
DirectWrite Enabled: true (6.2.9200.16571)
Driver Date: 8-25-2010
Driver Version: 8.15.10.2202
GPU #2 Active: false
GPU Accelerated Windows: 1/1 Direct3D 10
Vendor ID: 0x8086
WebGL Renderer: Google Inc. -- ANGLE (Mobile Intel(R) 4 Series Express Chipset Family Direct3D9Ex vs_3_0 ps_3_0)
windowLayerManagerRemote: false
AzureCanvasBackend: direct2d
AzureContentBackend: direct2d
AzureFallbackCanvasBackend: cairo
AzureSkiaAccelerated: 0
JavaScript
Incremental GC: true
Accessibility
Activated: false
Prevent Accessibility: 0
Library Versions
NSPR
Expected minimum version: 4.10.1
Version in use: 4.10.1
NSS
Expected minimum version: 3.15.2 Basic ECC
Version in use: 3.15.2 Basic ECC
NSSSMIME
Expected minimum version: 3.15.2 Basic ECC
Version in use: 3.15.2 Basic ECC
NSSSSL
Expected minimum version: 3.15.2 Basic ECC
Version in use: 3.15.2 Basic ECC
NSSUTIL
Expected minimum version: 3.15.2
Version in use: 3.15.2Are there other similar downloads on the site that do work, such as images, Word documents, etc., or are they all broken the same way?
I wasn't familiar with the ModPlugin extension. Does it operate on the site that has the problem? If so, could you test with the extension disabled? You can do that by restarting in Firefox's Safe Mode, or manually on the Add-ons page. Either:
* Ctrl+Shift+a
* orange Firefox button (or Tools menu) > Add-ons
In the left column, click Extensions.
If that extension is not relevant to the site that has the problem, or if the problem continues after disabling it, can you provide a link to the site so someone could check it out?
Maybe you are looking for
-
I'm trying to figure out a way to put some children's songs on the Curve but not in the same folder of MUSIC on my 2 gig media card. I'd rather not have Madagascar play when listening to my favorite tunes! I currently hid them in my RINGTONE folder b
-
Whenever I set up a second monitor, my computer crashes after about 5 minutes. Whenever one of my monitors is up, either one, it's fine. I'm running a G4, and a radeon 9800. I have an LCD studio display and a CRT Studio display. It's really nice to w
-
Changing fonts in textArea ??
How does one change the fonts of only part of the text inside a textArea? For my project I need to turn some strings bold when a button is pressed, but leave the rest of the text untouched. Does anyone know how to do this? Thank you, Laz
-
Work Schedule in HR Master Data Feeding Work Center!
Hi, I have several questions on how work schedule in HR master data relates to the work center for capacity planning. 1. How do we assign the employee to a work center? is that in the HR master data or work center or some other transaction? 2. If we
-
Certain Web Sites Think I Am in Germany
I am located in the U.S. However, certain retail web sites that I visit (e.g., Macy's) display text in English but prices in Euros. Also, these web sites assume I am shipping to Germany, even before I enter any address for shipping. This occurs even