This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes applet servlet communication in iplanet environment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "applet servlet communication in iplanet environment" Watch "applet servlet communication in iplanet environment" New topic
Author

applet servlet communication in iplanet environment

Sowjanya Raghu
Greenhorn

Joined: Oct 29, 2000
Posts: 17
How do I communicate with an applet from a servlet in iplanet environment?
Some sample code would be helpful
Thanks
Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
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


<b>Sandeep</b> <br /> <br /><b>Sun Certified Programmer for Java 2 Platform</b><br /> <br /><b>Oracle Certified Solution Developer - JDeveloper</b><br /><b>-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java </b><br /><b>-- Object-Oriented Analysis and Design with UML</b><br /> <br /><b>Oracle Certified Enterprise Developer - Oracle Internet Platform</b><br /><b>-- Enterprise Connectivity with J2EE </b><br /><b>-- Enterprise Development on the Oracle Internet Platform </b>
Sowjanya Raghu
Greenhorn

Joined: Oct 29, 2000
Posts: 17
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

Joined: Apr 02, 2001
Posts: 1157
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

Joined: Oct 29, 2000
Posts: 17
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.

 
Consider Paul's rocket mass heater.
 
subject: applet servlet communication in iplanet environment
 
Similar Threads
Where in deployment environment to put a class of an applet, a servlet and HTTP(applet-servlet comm)
iPlant application server
IPlanet newbie
iPlant application server
WAS 4.0 plugin-cfg parsing error