• 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-servlet commn

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
all,
I am using applet as frontend to servlet.
servlet get some data from database,and send it to applet as follows:
//in servlet
ObjectOutputStream out =
new ObjectOutputStream(res.getOutputStream());
out.writeObject(result);

result is a Serializable object of type suppose BDResult,which contain all the information from ResultSet.I m writing it usint writeObject()as i can't send ResultSet, as it is not serializable.
received in applet as follows:
//in applet
ObjectInputStream in=newObjectInputStream (urlConnection.getInputStream());
BResults results=(DBResults)in.readObjec);
i put the applet & servlet class in SERVER_CLASSES & SERVLET_CLASSES respectively of my weblogic server.
now where should i keep DBResult class file,so that both servlet and applet could be compiled.
Thanks
yashendra
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Due to the way applet and servlet load classes, you need two copies, one where the the other applet classes are kept and one where the servlet classes are kept.
Bill
 
You had your fun. Now it's time to go to jail. Thanks for your help 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