Solved

•Servlet Callback method ??

Posted on 2004-08-15
3
936 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

-Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

733 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