• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

image display quary: need help

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello friends,

i have an signed japplet which is run using jsp. now i want to display image selected from clients local file system.

is it possible to display image in this signed japplet from clients file system without uploading that image?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, a signed applet has access to the client file system, and thus can open and display images.
 
Nidhi Nagre
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you very much for your kind of help

can i store image data in session attribute?

which of the two way will be more significant to use?

1) displaying image in applet without uploading it, or
2) displaying an uploaded image in applet retrieving it from server
[ November 26, 2007: Message edited by: Nidhi Nagre ]
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

can i store image data in session attribute?


Yes, but you said you didn't want to upload the image.

which of the two way will be more significant to use?


Not sure what you mean by "significant" - efficient?

Why would you want to upload the image if you're going to display it in the applet? It seems that uploading it would just cost extra time, extra effort, extra page loads etc. without any benefits.
 
Nidhi Nagre
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you very much one 2nd

i got my quary solved

one more question
how can i send back file data from servlet to applet before saving it into database using HttpClient just like HttpConnection two way circle?
what should i add Content-type for response, again multipart/form-data? or since it is present as binary data in inputstream hence it should it be
application/octet-steam?
should i add FileItem objects to outputstream directly?
please write couple of lines of code
[ November 26, 2007: Message edited by: Nidhi Nagre ]
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

what should i add Content-type for response, again multipart/form-data? or since it is present as binary data in inputstream hence it should it be
application/octet-steam?

Multipart/form-data is for requests only; use application/octet-steam.

should i add FileItem objects to outputstream directly?


Just stream the binary file data, as you're getting it from the output stream of FileItem. But why would you need to send that data to the applet, if the applet has just uploaded it?
 
Nidhi Nagre
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Mr Ulf wrote:
Just stream the binary file data, as you're getting it from the output stream of FileItem.



would please make it clearer one 2nd, moreover how can i open inputstream inside applet?


But why would you need to send that data to the applet, if the applet has just uploaded it?



i just wants to know how it is possible?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm getting confused now about what exactly you have now (where are images, and where are they being transferred to), and what are you still trying to implement. Maybe you can clarify that so we know how to help.
 
They gave me pumpkin ice cream. It was not pumpkin pie ice cream. Wiping my tongue on this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic