Solved

•Servlet Callback method ??

Posted on 2004-08-15
3
887 Views
Last Modified: 2013-12-10
•why we say that the followings are Servlet Callback method ?
–doGet
–doPost
–Init
–Destroy

why we use the word "callback".

thanks
0
Comment
Question by:she1
3 Comments
 
LVL 23

Expert Comment

by:rama_krishna580
ID: 11807028
Hi,

A callback method is a method intended to be passed as a parameter. The callee can then call the passed method asynchronously and with whatever parameters it deems appropriate. Callbacks are often used in event handling code.

R.K
0
 
LVL 7

Expert Comment

by:damonf
ID: 11825012
as RK says, a callback method is designed to be called asynchronously.  That is, if object A owns method callback(), and object A enlists object B to perform some work, object B may later call a.callback() with the result of the work.  Object A does not need to maintain a reference to B for this to happen.

doGet and doPost are callbacks because any HTTP client can call them any time.  Init() and destroy() are callbacks because the container can call them anytime if it wishes to start and stop the servlet.  Actually doGet and doPost are really called by the container as well (in reaction to the client's HTTP request).  But they still can be called any time.
0
 
LVL 1

Accepted Solution

by:
fschutte earned 30 total points
ID: 11907693
they are simply callback methods because they are invoked by the container (every container managed component has callback methods because that's the way to communicate with the container)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Configure Web Service (server application) I. Configure security for Web Services methods First, we need to protect Session bean which implements the service: 1. Open EJB deployment descriptor (ejb-jar.xml) in the EJB project that contains you…
This article is about some of the basic and important steps to be used to improve the performance in web-sphere commerce application development. 1) Always leverage the Dyna-caching facility provided by the product 2) Remove the unwanted code …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now