• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

problem in sending image from applet to servlet

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

i have a need to send an image from applet to servlet via HttpConnection and getting back that image from applet.
i am struggling with this sice many hours and got tired by searching any post that would help me but haven't got yet.

i tried using this code but it dosent make any execution sit right. i got java.lang.NullPointerException at ImageIcon.getDescription() line;

at applet side



and this is at servlet side



i really need your help. please let me out of this headche

thanks

[ November 24, 2007: Message edited by: Nidhi Nagre ]

[ November 24, 2007: Message edited by: Nidhi Nagre ]
 
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 am guessing that means that no ImageIcon object is read from the ObjectInputStream, so v.get(0) returns null.

A further guess would be that moving the v.remove(0) statement in the applet code after oboutStream.close() might fix that.
 
Time flies like an arrow. Fruit flies like a banana. Steve flies like a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic