Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Upload memory data instead of file

 
Chris Wang
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic