Is Servlet Class Thread safe?????? How to make servlet
Thread safe ???
Answer Posted / santhosh kandula
Yes, Servlet is thread safe, because the process of
servlet is request and response. whenever the request comes
then the server can respond. suppose at a time there more
request are came to the server in that which request is the
server can respond, in that time threads will be created
and based on priority of the thread response will be given
for the request.
So, servlets are thread safe.By using thread
properties we make the servlet Thread safe.
| Is This Answer Correct ? | 2 Yes | 23 No |
Post New Answer View All Answers
Differentiate between the get and post method
What must be implemented by all servlets?
What is the major difference between context parameter and context attribute?
What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?
What do you mean by chaining in servlet?
Tell the new features added in servletrequest interface i.e. Servlet 2.4
Difference between GET and POST?
What is servlet in simple terms?
Is dispatcher servlet a singleton?
Hello, My project requirement is like I need to create a web page using MVC pattern. I hava a bean class, jsp page, servlet, service and dao. My jsp has two fields. One is dropdown list. The option values has to get populated from the database table. The other one is a text box and its value has to come from database table. As of now I have defined the fields in bean class, got the values from database using arraylists in dao class and I called this from service class. Can anyone please tell me the workflow of how the servlet will get this arraylist and populate the arraylist values as dropdown options in jsp page? Also I would like to know the role of bean class in MVC pattern? Thanks in advance!
What is the directory structure of a war file?
What is a server side include (ssi)
How do you define a servlet?
What is called Session Tracking?
Is servlet thread safe?