| Author |
Receiving a stream from a jsp
|
Rajesh Khan
Ranch Hand
Joined: Oct 16, 2011
Posts: 230
|
|
Hi i am using a 3rd party library for asynch upload of a file(pic). The JS library sends the file as a data stream
How can i save this file to a physical location path(say d:\pic.jpg)
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56191
|
|
|
What's in file? And why are you setting the X-Requested-With header? XHR will handle that.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56191
|
|
|
Technical nit: once the page gets to the browser, it's not a JSP, it's an HTML page like any other. So you are not receiving anything from a JSP, but from an HTML page.
|
 |
Rajesh Khan
Ranch Hand
Joined: Oct 16, 2011
Posts: 230
|
|
Bear Bibeault wrote:Technical nit: once the page gets to the browser, it's not a JSP, it's an HTML page like any other. So you are not receiving anything from a JSP, but from an HTML page.
Thanks for correcting me. BTW its a 3rd party library and thats how it is in the code. Its a picture file. Basically i am trying to upload a picture from the HTML page asynch. and upload it to a DB.
The JS open source widget allows me to select a file and asynch. send it to the server in this case a servlet.
|
 |
Rajesh Khan
Ranch Hand
Joined: Oct 16, 2011
Posts: 230
|
|
|
Problem solved used getInputStream from request and then used OutputStream to write to a file..
|
 |
 |
|
|
subject: Receiving a stream from a jsp
|
|
|