Answer Posted / chandra kunchala
yes ofcourse we should.
it is mandatory for servlet.
for servlets we required publc no argument constructor. if v
don't having that one, our servlet should not work, even
though if you are not crating the public no-argument
constructor, the java compiler will take the responsibility
to create public no- argument constructor.. mean while your
servlet should be public otherwise you will get
RuntimeException.
we can create costructor for sevelet but it should b no-
argument constructor. and u r servlet should be public.
and one more thing this constructor in not in the place of
init() method..
Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
what is the different between a servlet and a cgi? Why do you go for servlet rather than cgi?
How can you start a jta transaction from a servlet deployed on jboss?
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 are the uses of servlet
What is the effective way to make sure all the servlets are accessible only when user has a valid session?
What are the advantages of cookies?
How we can create war file in servlet?
What is the inter-servlet communication?
When a servlet accepts a call from a client, it receives two objects. What are they?
What are important features of Servlet 3?
How will two or three servlets interact or communicate with each other?
what is servlet chaining?
When servlet is loaded?
What are its drawbacks of cgi?
Can filter be used as request or response?