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 default http method in the servlet?
What’s the difference between forward() and sendredirect() methods?
What are the features added in Servlet 2.5?
Define context initialization parameters.
Explain the concept of ssi ?
What is difference between jsp and servlet?
What is the disadvantage of cookies?
Explain Action Servlet?
Difference between doget and dopost?
How the JSP file will be executed on the Server side?
Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?
What is cookies in servlet with example?
Write a program to show the functionality of doget and dopost method?
How do you run a servlet?
How printwriter is different from servletoutputstream?