Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet servlet communication in iplanet environment

 
Sowjanya Raghu
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • 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
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic