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   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Java J2EE  >>  Java Related  >>  Struts
 
 


 

 
 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 ServletContext and 
ServletConfig?
 Question Submitted By :: Naveenraj
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is the difference between ServletContext and ServletConfig?
Answer
# 1
Hi,

ServletContext: ServletContext is a view of webapplication, 
there will be only one servletcontext for one 
webapplication. It acts as shared memoty area, all the 
components of a webapplication can access the data from  
servletcontext object.

ServletConfig:  ServletConfig will be specific to each 
servlet. If your webapplication contains 20 servlets then, 
there will be 20 servletsconfig objects.
 
Is This Answer Correct ?    4 Yes 1 No
Devarathnam Chinnakotla. Banga
 
  Re: what is the difference between ServletContext and ServletConfig?
Answer
# 2
Servlet Context: Servlet Context defines a set of methods
that a servlet uses to communicate with its servlet container.

Servlet Config: A servlet configuration object used by a
servlet container passes information to a servlet during
initialization.
 
Is This Answer Correct ?    1 Yes 1 No
Sunil Kumar- Vizag
 
 
 
  Re: what is the difference between ServletContext and ServletConfig?
Answer
# 3
Servlet Context -> It is one for the web application.
Servlet Config -> It is one for the Servlet.
 
Is This Answer Correct ?    2 Yes 0 No
Raghu
 

 
 
 
Other Struts Interview Questions
 
  Question Asked @ Answers
 
how to write my own Action servlet by extending pre-defined Action servlet in struts config. Sony2
how the error can be showed in the jsp page in struts? Wipro2
Wat is Difference between Mvc1 architecture and Mvc2 Architecture? HCL9
what r the disadvantages of MVC-2 Architecture? Process-IT1
how handle when client send multiple request at atime for single servlet IBM2
session menagement in servlets explaion briefly?  1
How do you know what to give for the "path " under in struts-config.xml ?  1
how will you view ur jsp page to the client by using properties file? Wipro2
How to set email notification using struts.Plz give the example code? HCL1
wahts the diif between Mvc1 and Mvc2? Wipro3
which MVC architecture struts follows and why?  4
what is tiles in struts?  4
advantages& 5 disadvantages of MVC architecture Satyam1
Is struts thread safe? HCL2
what is the purpose of action servlet and action?  4
Even though Servlets and JSP are web based concepts .wht is the use of using Struts using then TCS6
collection framework hirarchy?  2
How data transfered from one formbean to another formbean?  4
what is the difference between *.do & /do.*/? So what is the diffenence btn extension mapping & path mapping.What is those difference in work effect? Wipro6
How to explain struts work flow TCS5
 
For more Struts 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