what is difference between servletconfig and servletcontext?
Answer Posted / p.nandakishore
ServletConfig and ServletContext are interfaces in
javax.servlet package
ServletConfig is one per one Servlet.Each servlet as its
own ServletConfig object.The ServletConfig object is
provided by the Container during the initialization phase
of the Servlet.ServletConfig object can be user to read
initialization parameters into the Servlet from web.xml.
ServletContext is one per one web-application.All servlets
which are in a web-application have common ServletContext.
ServletContext can be used to communicate the Servlet with
the ServletContainer.It can also be used to read
initialization parameters from web.xml.It can be used to
share some resources between servlets which are in a web-
application.(resources like Connection object)
Is This Answer Correct ? | 16 Yes | 0 No |
Post New Answer View All Answers
hi am an engineering student and my next plan is for ms in either in us or australia i got my passport but i dont know anything bout visa can u give brief idea 1)How to get prepared for visa and 2)How to apply for top universities and 3)How to pay the fee and so on These all are basic questions plz give me a clear idea
Does sprintf add a null terminator?
What are loops in java?
What are the parts of a method?
What is a method in programming?
What about main thread in java?
Which variables are stored in stack?
How to convert string to char and vice versa?
What is oop principle in java?
What is threaded programming and when is it used? : Java thread
What is a package in java? List down various advantages of packages.
What are the wrapped, classes?
What is numel matlab?
What is a boolean in java?
What is the use of put method?