| Author |
Upload memory data instead of file
|
Chris Wang
Ranch Hand
Joined: Jan 13, 2004
Posts: 34
|
|
Hi, I have a third-part servlet which will deal with a jsp's upload control. In my jsp page I got a string data that the servlet needs. Can I simulate a file upload control in my jsp page to submit the string data to the servlet insteat of creating a real local file, which i have to browse it and delete it later? Thanks in advance. [ April 25, 2005: Message edited by: chris wang ]
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Are you saying you want the browser to trick the server into thinking it's sending a file when it's just sending a string from memory? I doubt you'll find a way to do that. The Javascript XMLHttpRequest object does allow you to set request headers. You might want to play around with that to see if you can spoof a multipart form request. Could be fun to try. http://developer.apple.com/internet/webcontent/xmlhttpreq.html The folks in the HTML/Javascript forum might be able to give you more information on it.
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: Upload memory data instead of file
|
|
|