Sir,
Can anybody help me how to contact an particular servlet from its corresponding applet and to pass the applet parameters to the servlet.
from
Muralidharan
-
communication between servlet and applet (6 messages)
- Posted by: Muralidharan narayana
- Posted on: July 06 2000 07:53 EDT
Threaded Messages (6)
- communication between servlet and applet by RAJEEV S on July 06 2000 09:37 EDT
- communication between servlet and applet by Nagarjuna KOtapati on July 20 2000 07:26 EDT
- communication between servlet and applet by George Anestis on July 21 2000 04:32 EDT
- how to compile and run by Anith prem on January 24 2001 22:32 EST
- Re: communication between servlet and applet by J Dev on September 09 2007 03:17 EDT
- Re: communication between servlet and applet by J Dev on September 25 2008 10:05 EDT
-
communication between servlet and applet[ Go to top ]
- Posted by: RAJEEV S
- Posted on: July 06 2000 09:37 EDT
- in response to Muralidharan narayana
Dear Murali,
Go to the Link "http://archive.coreservlets.com/Chapter17.html"
W.F.Y.Reply.
rajeevsmcp at usa dot net
RAJEEV.S
TVM,INDIA. -
communication between servlet and applet[ Go to top ]
- Posted by: Nagarjuna KOtapati
- Posted on: July 20 2000 07:26 EDT
- in response to Muralidharan narayana
See the O'reily SERVLETS ....Comunication between Applet and Servlet
regards,
nag -
communication between servlet and applet[ Go to top ]
- Posted by: George Anestis
- Posted on: July 21 2000 04:32 EDT
- in response to Muralidharan narayana
There is an excellent article at
http://developer.java.sun.com/developer/technicalArticles/RMI/rmi/
It mainly refers to RMI but you can find what you ask for with minor modifications.
The main idea is that you create a stream between servlet and applet and you use Serialization for the communication. -
how to compile and run[ Go to top ]
- Posted by: Anith prem
- Posted on: January 24 2001 22:32 EST
- in response to Muralidharan narayana
respected sir/mam
kindly help me out how to compile and run the servler and have the link btn the html and servlet.
-
Re: communication between servlet and applet[ Go to top ]
- Posted by: J Dev
- Posted on: September 09 2007 03:17 EDT
- in response to Muralidharan narayana
Here is the code which you can use to communication between applet and servlet/JSP following code can be used at applet side : /* *URL to servlet */ URL serverURL = new URL(servletPath); URLConnection connection = serverURL.openConnection(); /* * Connection will be used for both input and output */ connection.setDoInput(true); connection.setDoOutput(true); /* * Disable caching */ connection.setUseCaches(false); /* *connection will be used for transfaring serialized java objects. */ connection.setRequestProperty("Content-Type", "application/octet-stream"); ObjectOutputStream outputStream = new ObjectOutputStream(connection.getOutputStream()); outputStream.writeObject(request); outputStream.flush(); outputStream.close(); ObjectInputStream inputStream = new ObjectInputStream(connection.getInputStream()); response = (Map)inputStream.readObject(); inputStream.close(); Here response is the response Map returned from servlet. following code can be used in your servlet to send serializable objects to applet. write this code in doXXX method of servlet. ObjectOutputStream out = new ObjectOutputStream(response.getOutputStream()); Map responseMap = new HashMap(); /* put watever objects you wants to return to applet. This objects must be serializable. responseMap.put("a", "a"); */ out.writeObject(responseMap); out.flush(); out.close(); response.setStatus(HttpServletResponse.SC_NO_CONTENT); SS http://www.jyog.com -
Re: communication between servlet and applet[ Go to top ]
- Posted by: J Dev
- Posted on: September 25 2008 10:05 EDT
- in response to Muralidharan narayana