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 is singletonlist in java?

591


what are abstract functions?

653


what are three ways in which a thread can enter the waiting state? : Java thread

660


What is byte value?

637


Discuss 2D arrays.

703






What are the 2 types of java programs?

668


define polymorphism in java

723


Write an algorithm program in java for the following question.. 1) S is a set of integers.X is an integer obtained by sum of two digits in S. Write logic for whether or not the X is from the S. The time of algorithm should not exceed o(n logn).

1697


Differences between traditional programming language and object oriented programming language?

669


How do you check whether the list is empty or not in java?

605


Is java programming easy?

634


What is parsing a sentence?

644


What is passed by reference and pass by value ?

653


Does java linked list allow duplicates?

639


what is collatration?

2849