This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
applet servlet communication in iplanet environment
Sowjanya Raghu
Greenhorn
Joined: Oct 29, 2000
Posts: 17
posted
0
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
posted
0
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
Sun Certified Java ProgrammerScored 93 per cent
Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
IBM Enterprise Connectivity with J2EE Scored 72 per cent
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
posted
0
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
posted
0
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
Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
IBM Enterprise Connectivity with J2EE Scored 72 per cent
Enterprise Development on the Oracle Internet Platform Scored 44 out of 56
Sowjanya Raghu
Greenhorn
Joined: Oct 29, 2000
Posts: 17
posted
0
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.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: applet servlet communication in iplanet environment