what is the diff between Servletcontext and servletconfig?

Answer Posted / srinu

servletcontext:
1) servletcontext object one for webapplication
2)it used global init parameters
3)with help servletcontext object we find our webserver
ingformation(public java.lang.String getServerInfo())

servletConfig:

1)servletConfig object will be created every servlet suppose
in my webapplication 10 servlets are their 10 servletConfig
object will be created but only one SwervletContext object
will be created
2) it is the righthand object of servlet
3)it used local init parameters
4)with help of servletConfig object we find out logical name
of servlet(public java.lang.String getServletName())

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What initialize variables?

714


Does printwriter create a file?

751


How do we access static members in java?

848


What is the use of coding?

735


What is a null point?

757


What is method in research paper?

781


What is jdbc api?

758


How do you convert int to char in java?

832


What is Classloader in Java?

836


What is java in layman terms?

745


What is an example of a constant variable?

799


What is method overriding in java ?

878


What data structures are used to perform recursion?

811


What is meant by null and void?

743


how would you implement a thread pool? : Java thread

692