Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


In howmany ways applet-servlet communication can be done?



In howmany ways applet-servlet communication can be done?..

Answer / janet

There are three ways to communicate from an applet to
servlet and they are :

a) HTTP Communication(Text-based and object-based)
b) Socket Communication
c) RMI communication
(u can say by using URL object open the connection to
server and get the InputStream from URL connection object)
Steps involved for applet-servlet communication:
1) Get the server URL
URL url=new URL();
2) connect to the host
URLConnection Con=url.openConnection();
3) Initialize the connection
Con.setUseCatches(false);
Con.setDoOutput(true);
Con.setDoInput(true);
4) Data will be written to a byte array buffer so that w
can tell the server the length of the data.
ByteArrayOutputStream byteout=new ByteArrayOutputStream();
5)Create the outputStream to be used to write the data to
the buffer.
DataOutputStream out=new DataOutputStream9byteout);

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More Servlets Interview Questions

I Have A Plan to develop a Project in Struts,I want the template of struts project with Hibernate.Canany body provide me the required information?

0 Answers   IBM,


why are using HttpServlet in realtime projects and why are not using Genericservlet

2 Answers  


what are the different services provided by the web server?

2 Answers  


What is the difference between jsp and servlet life cycle?

0 Answers  


How the servlet is loaded?

0 Answers  


Define the life cycle of a servlets.

0 Answers  


What is servlet interface?

0 Answers  


How can we refresh automatically when new data is entered into the database?

0 Answers  


Which application server is best for java?

0 Answers  


Explain the difference between servletconfig and servletcontext in servlet?

0 Answers  


where the generated jsp source file are stored?

7 Answers   HCL,


How to make servlet thread safe?

9 Answers   Frisco Tech, InfoVista, WipSys Technologies,


Categories