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  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 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 diff between Servletcontext and servletconfig?
 Question Submitted By :: Chandranallam
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is the diff between Servletcontext and servletconfig?
Answer
# 1
ServletContext is created only once in a whole application 
whereas servletConfig is created for each servlet in an 
application.
 
Is This Answer Correct ?    6 Yes 0 No
Monisha
 
  Re: what is the diff between Servletcontext and servletconfig?
Answer
# 2
In ServletContext value will b same for whole application
and were as the servletConfige value will b seprate or
diffrant for all the application in the project..
 
Is This Answer Correct ?    2 Yes 0 No
Abdul Mannan
 
 
 
  Re: what is the diff between Servletcontext and servletconfig?
Answer
# 3
Every  web application has only one SContext object.
There are n number of SConfig objects in an Web app where
n is the number of servlets. It is specific to a servelt.  
ServletContext is used to get the context parameters.
ServletConfig is used to get to the init parameters.
 
Is This Answer Correct ?    0 Yes 1 No
Srinivasa
 
  Re: what is the diff between Servletcontext and servletconfig?
Answer
# 4
ServletContext: One Object(ServletContext) for application
ServeltConfig: It is specifig to a servelt in an 
application. Each servlet will have a ServletConfig
 
Is This Answer Correct ?    0 Yes 0 No
Sreenu Karampudi
 
  Re: what is the diff between Servletcontext and servletconfig?
Answer
# 5
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 ?    1 Yes 0 No
Srinu
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What is the use of bin and lib in JDK?  3
What happens when a main method is declared as private? Sun-Microsystems8
I want to know the host name and provider name for tcs web mail TCS3
why marker interfaces are there in java Digital-Group3
what is request dispatcher and how does it work? CTS1
what is difference between Action messages and Action errors? TCS1
Howmany number of objects we can store in an ArrayList. Is there any limit? TCS5
Diff between C++ and java? TCS8
Explain cookies?  2
How to validate the request (Eg:user name and password) in session(http session)? not in LDAP server ? Saksoft1
we know that every java prog must follows OOPS Principles. Anybody can answer, HOW THE FOLLOWING PROGRAM FOLLOWS OOPS CONCEPTS i.e, Inheritance,Polymarphism,Encapsulation? class a{ public static void main(String args[]){ System.out.println("Hello World"); } }  3
Hi Friends, I am new to java. Can u explain about thread concept.How i know one thread is locked, and how can i force or acquire another thread for lock . Finally how to know thread is released from lock. Explain types of lock(like method level and block level) in thread.  1
what is diff bet iterator and enumeration?  2
Which characters are allowed to use as the second character of an identifier, and which characters are not allowed?  2
In what type of containers, Border layout is a default layout?  3
What is the return type of a program?s main() method?  2
Explain the term serialization? Wipro6
what is difference between String buffer and String builder? Benchmark2
what are ER diagrams?  2
What is difference between Eclips and MyEclips?  2
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

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