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
When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?
What are the jobs performed by servlets?
What is the major difference between servlet and applet?
Write the code to get the server information in servlet.
What is ServletContext object?
Why the container loads server at the application startup and how?
What is servlet instance?
Difference between GET and POST?
Is tomcat a servlet container?
What are the phases of a servlet life cycle?
What do you mean by default initialization in java servlet?
What is the use of servlet wrapper classes?
What is servlet configuration?
Explain the war file?
What is the process to implement doget and dopost methods?