Communiquez avec les autres et partagez vos connaissances professionnelles

Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.

Suivre

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

user-image
Question ajoutée par Utilisateur supprimé
Date de publication: 2014/01/23
Ramy Diab
par 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

Avez-vous besoin d'aide pour créer un CV ayant les mots-clés recherchés par les employeurs?