Answer Posted / sanjay sah
Yes, we can create constructor for servlet but that one
should be public no-args constructor.
If we do not create then compiler itself takes care for
it.Servlet container creates instance of servlet by invoking
public no-agrs constructor.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Is that servlet is pure java object or not?
What are the phases of the servlet life cycle?
I have a requirement Here we have a ResultSet object that will contain 50 records i need to print those recors in to a webpage(i.e; view according to MVC architectures that mybe servlet or jsp) . Here i need to print the records 10 per page that is 1 to 10 in page one and 11 to 20 in page two like remaining will be appeared in other pages we need to display those page numbers whenever we click on that page number we will go to that page and display 10 records like we will display 5 pages it is like this << 1 2 3 4 5 next >>
What is the difference between encodeRedirectUrl and encodeURL?
Which java application server is the best?
Describe in brief RequestDespatcher?
Why do we need servlet filter?
What is servlet container. how it works?
Explains the differences between context.getrequestdispatcher() and request.getrequestdispatcher()?
What do you mean by cgi?
What’s the use of the servlet wrapper classes??
Which http method is said to be non-idempotent and idempotent?
What is the difference between Servlets and Applets?
What are the different mode that servlets can be used?
request parameter how to find whether a parameter exists in the request object?