Hi guys.. Well can u tell me that why there is need of
"init()" , i mean why can not we initialize the servlet object
with the help of constructors?
Thank you.
Answer Posted / gaurav agrawal
If we initialize the servlet via constructor then we cant
access the ServletConfig object at the time of
initialization.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a servlet?
Hello, My project requirement is like I need to create a web page using MVC pattern. I hava a bean class, jsp page, servlet, service and dao. My jsp has two fields. One is dropdown list. The option values has to get populated from the database table. The other one is a text box and its value has to come from database table. As of now I have defined the fields in bean class, got the values from database using arraylists in dao class and I called this from service class. Can anyone please tell me the workflow of how the servlet will get this arraylist and populate the arraylist values as dropdown options in jsp page? Also I would like to know the role of bean class in MVC pattern? Thanks in advance!
What is servlet and its types?
What is the web server used for running the Servlets?
What is difference between server and servlet?
Explain the difference between generic servlet and http servlet?
Which interface must be implemented by all servlets?
What are the kinds of http requests?
Why the concept of single thread model interface is used?
What are all the protocols supported by httpservlet?
What are the difference between RMI and Servlets?
What do you mean by scope object and what are its types?
What's the difference between servlets and applets?
How can we refresh automatically when new data is entered into the database?
What do you mean by default initialization in java servlet?