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
What is the workflow of a servlet?
What are the steps that are involved in using the httpservlet class?
What are the phases of a servlet life cycle?
What’s the difference between forward() and sendredirect() methods?
What is the difference between servlet and jsp?
Which are the different ways you can communicate between servlets?
What is the use of servlet context?
How do you invoke a servelt?
What exactly is a servlet?
Whether we can get deadlock situation in servlets?
What is difference between GenericServlet and HttpServlet?
How can an existing session be invalidated?
What is the use of welcome-file-list?
Is servlet a controller?
Why session tracking is needed?