Answer Posted / paidi
Yes, It can possible to create the constructor inside the
servlet , it wont give any exception or error for creation
and it compile properly. But, Servlet initialization will
done by container. Container calls the init() to
initialize the servletconfg obj. No Use to write the
constructor inside the servlet.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How many objects of a servlet is created?
Which interface should be implemented by all servlets?
What is a java servlet?
What mechanisms are used by a Servlet Container to maintain session information?
Why don't we write a constructor in a servlet?
What is the difference between CGI and Servlet?
What is the servlet?
Explain mvc pattern.
Once the destroy() method is called by the container, will the servlet be immediately destroyed? What happens to the tasks(threads) that the servlet might be executing at that time?
What is difference between GenericServlet and HttpServlet?
What are common tasks performed by Servlet Container?
How can we refresh automatically when new data is entered into the database?
What is the
What are session variable in servlets?
What is the type of method for sending request from http server?