Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is the context between Servlet Context Object and Servlet Config in the Servlets programming?

user-image
Question added by Deleted user
Date Posted: 2014/01/23
Ramy Diab
by Ramy Diab , eBanking Senior Java Developer / Service Delivery Engineer , ejada

Hello ,

 

ServletContext object give you reference over all the application -context- , but servletConfig object give you reference on only one servlet.

 

For example you can use ServletContext to get the context initial parameters , and use servletConfig to get the servlet initial parameters.

note that there is only one servletConfig object avaliable to any servlet.

 

There is many other uses to both types of objects , you can getRequestDispatcher from servletContext , and you can log to the server using servletConfig ,.....

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.