Posts

Showing posts with the label download

Xcode Download? [closed]

Xcode Download? [closed] I just upgraded to OS X Mavericks, and I am very excited to be able to use all the new Mavericks technologies. I have just one problem: Where can I download Xcode? It is not listed in either the updates page in the Mac App Store, or at Apple’s developer website. Please tell me that I do not have to be a paid developer-program subscriber to download this update! The real problem is not with Xcode itself, but rather with the 10.9 SDK. Without the header files in the SDK, I cannot tell what the APIs are. As I do not know what the APIs are, I cannot use any developer tool (even those not based on Objective-C). I also noticed that Apple has not yet updated the Mac Dev Center with info for Mavericks, despite its public release. It is entirely probable that Apple is simply lagging behind with updating the developer website following today’s announcement. This question appears to be off-topic. The users who voted to close gave this specific reason: ...

Download file in Servlet

Download file in Servlet I am trying to download a file in a Servlet to the web client. I keep on getting this error. Exception in thread "Thread-5" java.lang.NullPointerException at org.apache.coyote.http11.Http11OutputBuffer.commit(Http11OutputBuffer.java:347) at org.apache.coyote.http11.Http11Processor.prepareResponse(Http11Processor.java:1402) at org.apache.coyote.AbstractProcessor.action(AbstractProcessor.java:327) at org.apache.coyote.Response.action(Response.java:173) at org.apache.coyote.http11.Http11OutputBuffer.doWrite(Http11OutputBuffer.java:219) at org.apache.coyote.Response.doWrite(Response.java:541) at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:351) at org.apache.catalina.connector.OutputBuffer.flushByteBuffer(OutputBuffer.java:825) at org.apache.catalina.connector.OutputBuffer.append(OutputBuffer.java:730) at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:391) at org.apache.catalina.connector.OutputBuffe...

res.download function is not working in express.js

res.download function is not working in express.js I want to download a file in node.js using express.js framework according to the get request url. I didn't get an error in this code, but the file is not downloaded, it shows success message. Kindly look at following code, can anyone solve this issue? var express=require("express"); var bodyparser=require("body-parser"); var app=express(); var path=require("path"); app.get("/download/:folder/:file(*)",function(req,res) { var folder=req.params.folder; var filename=req.params.file; var downloadlocation=path.join(__dirname,folder,filename); console.log(downloadlocation); res.download(downloadlocation,function(err,success) { if(err) { console.log("download failed try again"); } else { console.log("download successfully"); } }); }); app.listen(8086,function() { console.log("serv...