can servlet have instance variables?

Answer Posted / ravikiran.chd

yes and we can make them thread safe by implementing
SingleThreadModel

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain their methods? Tell me their parameter names also have you used threads in servlet?

585


Why do we have servlet wrapper classes?

580


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()?

619


What are all the advantages of servlet over cgi?

608


What is the difference between Server and Container?

622






What is pure servlet?

698


Why is a constructor needed in a servlet even if we use the init method?

612


Which interface must be implemented by all servlets?

799


What is servlet and its types?

558


What do you mean by the servlet chaining?

549


If some new data has entered the database, explain how can a servlet refresh automatically?

739


Explain web container.

571


What are the ways to handle multi-threading in servlets?

596


What is servlet container?

667


Name the different ways of session tracking.

572