• 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 communication in iplanet environment

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How do I communicate with an applet from a servlet in iplanet environment?
Some sample code would be helpful
Thanks
 
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Raghu,
I donot think the environment would make a difference for Applet-Servlet Commumnication.
You can use HTTP Tunnelling to achieve it.It means you are reading and writing serialized objects through HTTP Connection.The applet opens a URLConnection to the servlet, and writes the serialized Object in the ObjectOutputStream.The servlet would read this request using the ObjectInputStream and write it in the response for the applet to read it using its(applet's) ObjectInputStream.
You would find an excellent example for this in Developing Java Servlets by James Goodwill,Chapter 7, HTTP Tunnelling
Hope this helps,
Regards,
------------------
Sandeep Desai
vgdesai@bom3.vsnl.net.in

  1. Sun Certified Java Programmer Scored 93 per cent
  2. Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
  3. IBM Enterprise Connectivity with J2EE Scored 72 per cent
  4. Enterprise Development on the Oracle Internet Platform Scored 44 out of 56
 
Sowjanya Raghu
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thanks for the reply, but the problem I have here is that the user is making an entry through the servlet and once he has been authenticated , the servlet calls the applet passing the session id to it and the applet just displays the session id at the moment. In the future it might speak to another servlet to get some other info.
I am stuck as to where to place the applet class file?
And Can I generate the html for the applet dynamically within the servlet ?
Thanks again
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Raghu,
I am not sure where you would place the applet class file in the iPlanet environment.I have been using OAS, and it is normally JARed with the Servlet class files.
As regards to your other query, yes, you can dynamically generate the applet from within the servlet.It is just like you put your other HTML tags in the out.println statements

Hope this helps.
Regards

------------------
Sandeep Desai
vgdesai@bom3.vsnl.net.in

  1. Sun Certified Java Programmer Scored 93 per cent
  2. Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
  3. IBM Enterprise Connectivity with J2EE Scored 72 per cent
  4. Enterprise Development on the Oracle Internet Platform Scored 44 out of 56
 
Sowjanya Raghu
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Thanks for the reply again...
I will try to jar the applet class with the servlet stuff and see what happens ?
and thanks for the sample code as well.

reply
    Bookmark Topic Watch Topic
  • New Topic