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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Is servlet a server side scripting language?

1065


What is the use of welcome-file-list?

976


what is the different between a servlet and a cgi? Why do you go for servlet rather than cgi?

989


Can servlet have a constructor ?

998


What is the use of send redirect () method?

1024


request parameter how to find whether a parameter exists in the request object?

954


What do you mean by cgi and what are its drawbacks?

930


Why servlet is mostly used?

1185


Differentiate between the get and post method

1004


Explain their methods? Tell me their parameter names also have you used threads in servlet?

988


Why is init() method is used in servlets?

957


What is the purpose of dispatcherservlet properties?

1016


What do you mean by servlet context?

1057


how to link html file to sevlet file.one name is textbox,c&c++ is cheakbox,bc&mca is radio button and one submit buttonis ok why in this programme use in servelt file

2645


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

1052