can servlet have instance variables?

Answer Posted / debapriya maity

Yeah we surely can provide instance variable,but ur servlet
implements MultithreadModel,its is not the right
approach,better use local varibles ,using SingleThreadModel
approach cause perfomance degradation

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to upload a file to the server using servlet?

533


Explain the war file?

612


What must be implemented by all servlets?

577


Explain url encoding?

519


Difference between forward() method and sendredirect() method ?

584






How to read request headers from servlets?

564


How can we create deadlock situation in servlet?

852


How do I use cookies to store session state on the client?

536


What is meant by a web application

543


Can you send an authentication error from a servlet?

525


Tell us something about servletconfig interface.

582


What is servlet mapping?

603


What is the advantage of Servlets when compared with other server side technologies?

1858


Write the code to get the server information in servlet.

573


What are the life cycle methods of the servlet?

578