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

Applet to Servlet Communication

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

I had a Applet which needs to read some data from the database.
The data is read from the database via a Servlet .The requisite data
is there in the Value Objects wrapped inside an ArrayList .
The servlet makes a ObjectOutputStream object passing
response.getOutputStream() as the argument & writes the ArrayList obj
in the output stream .

In the applet , i make a URL Connection obj named servletconnection. which points to that servlet .
Upto this point everything goes fine & the connection is established .
Now i make a ObjectInputStream obj & passes the arg as servletconnection.getInputStream().
When i prints the available size it shows as 0.
Am i not pointing to the correct stream .

Pls. help me out .

Bye n Tanks in Advance ,


Reagrds,
Mohit.
 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are some good examples here that might help!
 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For applet-servlet communication the jakarta httpclient api is always interesting.
 
I am a man of mystery. Mostly because of this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic