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
What does percent mean in java?
What are the advantages of packages in java?
What is mean by collections in java?
How do you create an array in java?
What is class forname?
If an application has multiple classes in it, is it okay to have a main method in more than one class?
Why collection doesn’t extend cloneable and serializable interfaces?
What is byte code and why is it important to java’s use for internet programming?
How to display all the prime numbers between 1 and 100
What is callablestatement? How you can call stored procedure to pass in parameter?
What is core java used for?
What is java literals?
What is the difference between size and length in java?
Explain differences between checked and unchecked exceptions in java?
Why singleton class is used in java?