ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Java J2EE  >>  Java Related  >>  Servlets
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
What is the difference between servlet config and servlet 
context.
 Question Submitted By :: Manian_20
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the difference between servlet config and servlet context.
Answer
# 1
Servlet config is a private area for every servlet.Any 
variable stored there is accessible to only that servlet 
while sevlet context is a shared area for every servlet in 
an application.In an aaplication every servlet can access 
the variable stored in servlet context.
 
Is This Answer Correct ?    4 Yes 0 No
Mamta Singh
 
  Re: What is the difference between servlet config and servlet context.
Answer
# 2
Servlet Context :
In servlet programming, the servlet context is the
environment where the servlet runs. The servlet container
creates a ServletContext object that you can use to access
information about the servlet's environment.

ServletConfig:
A servlet configuration object used by a servlet container
used to pass information to a servlet during initialization.
 
Is This Answer Correct ?    2 Yes 1 No
Sulthansheriff
 
 
 
  Re: What is the difference between servlet config and servlet context.
Answer
# 3
Servlet context is a context for all servlets under the web 
application.in the web application there is only one 
context.and all the servlets communicate each other through 
context and it uses context parameters
In the web application each servlet have one servlet config 
object it uses init parameters.
 
Is This Answer Correct ?    2 Yes 0 No
M.sridharreddy
 
  Re: What is the difference between servlet config and servlet context.
Answer
# 4
servlet config is used to obtain configuration data when it
is  loaded in to the application server.
for each servlet servlet config will be indipendent and the
configuration of a servlet is intialized in the servlet
config file.

servlet context is used to obtain the information about the
environment in which it is running.one application have only
one servlet context file.through this servlet context file
we can acces servlets in that application.
 
Is This Answer Correct ?    1 Yes 0 No
V.tulasiprasad
 
  Re: What is the difference between servlet config and servlet context.
Answer
# 5
servlet context hold the info about application and servlet
config hold the servlet info.
 
Is This Answer Correct ?    1 Yes 1 No
Kalareddy
 

 
 
 
Other Servlets Interview Questions
 
  Question Asked @ Answers
 
What is a Proxy Server?  1
where the session data will stored?  1
How can you maintain servlet chaining?  1
What type of protocols are used in HttpServlet?  1
Difference between web container & web server........... Difference between web server & application server????????? TCS2
How we can check in particular page the session will be alive or not Symbiosis3
How to set a cookie that is persisted only for the duration fo the clients session?  1
Explain the methods in Generic and HTTP Servlets?  1
Is the init(ServletConfig sc) throws IOException or not?  3
when the jsp page is translated to servlet? HCL2
How to handle the debug errors in servlets?  1
Difference between Include, Forward and sendRedirect in Servlet? AZTEC3
i have 500 jsp in my application ,with same forward name,it lokks for appropritae jsp from 1 to 500,but i want to send response to 498 page,what should i do Globerian1
What is Generic Servlet and how it is different from Http Servlet? Wipro3
How session tracking can be achieved, if your browser doesn't support cookies (or) if cookies are disabled?  2
What is session variable in servlets?  1
difference between sendredirect,forward and url rewritting TCS3
What are cookies and how will you use them?  1
can i call destroy() method in init() method of servlet IBM5
What is the capacity that doGet method can send to the server?  3
 
For more Servlets Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com