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

How do you create a cookie using servlet?

0 Answers  


What is the main purpose of java servlets?

0 Answers  


Servlet Chaining? How do you do the Filtering in Servlets?

6 Answers   HCL,


HTTP tunneling means what?

2 Answers  


what is a session object?

2 Answers  


can i override service method

3 Answers   Intelligroup,


can i call init() method in destroy() method of servlset. ?

5 Answers   IBM,


What is string tokenizer?

0 Answers  


How to upload a file to the server using servlet?

0 Answers  


How to invoke a Servlet?

2 Answers   Mastek,


can u give some realtime example in ploymorphism? and inheritance?

11 Answers   SolutionNET,


Which java application server is the best?

0 Answers  


Categories