ServletConfig and ServletContext

ServletConfig and ServletContext

View Answers

November 18, 2009 at 12:27 PM

Hi Friend,

<init-param> and <context-param> are the name/value pairs that specify the initial values of the servlet/JSP variables.They contain the information that be used to customize and control the behavior of a servlet or a JSP.

The information stored in <init-param> is available in the context of a servlet or filter in the web application.
The information stored in <context-param> is available to the entire scope of the web application.The Context initialization parameters may be used as the basis of data that is made available to all servlets and JSP pages. Each web application consists of one ServletContext, which can be used as share resources.

For more information, visit the following links:

http://www.roseindia.net/servlets/GettingInitParameterNames.shtml
http://www.roseindia.net/tutorial/servlet/getContextParameters.html

Thanks









Related Tutorials/Questions & Answers:
Difference between ServletContext and ServletConfig
Difference between ServletContext and ServletConfig   What is the difference between ServletContext and ServletConfig?   ServletContext... to a log file.The ServletContext object is contained within the ServletConfig
ServletConfig and ServletContext - JSP-Servlet
ServletConfig and ServletContext  Hi, What kind of infomation can be stored in and for ServletConfig and ServletContext objects .PLease give.... Each web application consists of one ServletContext, which can be used as share
Advertisements
difference between servletconfig and servletcontext in java
difference between servletconfig and servletcontext in java  difference between servletconfig and servletcontext in java   ServletContext ServletContext is implemented by the servlet container for all servlet
difference between servletconfig and servletcontext in java
difference between servletconfig and servletcontext in java  ServletConfig is implemented by the servlet container to initialize a single servlet using init(). ServletContext is implemented by the servlet container for all
Difference Between ServletConfig And ServletContext
Difference Between ServletConfig And ServletContext Here we will see how the ServletConfig And ServletContext are different from each other. Most... the ServletContext click here.ADS_TO_REPLACE_2 Basically, ServletConfig
ServletContext
ServletContext   Explain ServletContext ?    ServletContext interface is a window for a servlet to view it's environment. A servlet can use... and only one ServletContext and is accessible to all active resource
ServletContext
ServletContext  What is ServletContext?   ServletContext is an Interface that defines a set of methods that a servlet uses to communicate with its servlet container, for example, to get the MIME type of a file, dispatch
ServletContext
ServletContext       ServletContext is an interface that is defined in the javax.servlet package... file. Each web application has only one ServletContext, which is accessible
Explain ServletContext.
Explain ServletContext.  Explain ServletContext.   Hi, Here is the answer,ADS_TO_REPLACE_1 ServletContext interface is a window...?s version. Every web application has one and only one ServletContext
explain servletconfig with programiing example?
explain servletconfig with programiing example?  explain servletconfig with programiing example?   ServletConfig is a servlet configuration object used by a servlet container used to pass information to a servlet during
Java ServletConfig Interface
Java ServletConfig Interface In this tutorial, we will discuss about ServletConfig Interface. ServletConfig Interface : The servlet container uses a ServletConfig object to pass initialization information to the servlet. In general
ServletContext Java EE 6
ServletContext Java EE 6 In this tutorial you will learn about the modification in ServletContext interface's made in Java EE 6. Definition of ServletContext is remain same, as usual you know the definition of ServletContext
difference between init() & init(ServletConfig config)?
difference between init() & init(ServletConfig config)?  I want to know the difference between init() and init(ServletConfig config) methods in GenericServlet
Java ServletContext Interface
Java ServletContext Interface In this tutorial, we will discuss about ServletContext Interface. ServletContext Interface : ServletContext defines set.... ServletContext object is used to communicate with the servlet container. There is only
Servlet Context
; ServletContext is a interface which helps us to communicate with the servlet container. There is only one ServletContext for the entire web... it. The information in the ServletContext will be common to all the components. Remember
ServletContextListener example
; ServletContextListener we should understand what is ServletContext. ServletContext... ServletContext for the entire web application and the components of the web application can share it. The information in the ServletContext will be common
ServletContext
Servlet Context
is created by the Servlet. ServletConfig object keeps the ServletContext object.... ServletContext an interface is used for communicating the Servlet Container. ServletContext provides the various methods using which a Servlet container can share
servlet - Servlet Interview Questions
servlet  what is the difference between servletconfig and servletcontext objects in servlet.If any body knows please tell me
servlet - Servlet Interview Questions
servlet  what is the difference between servletconfig and servletcontext objects in servlet.If any body knows please tell me
Servlets - JSP-Servlet
give the clear idea of ServletContext and servletConfig.  Hi friend, ServletContext and ServletConfig,both are interfaces. The ServletConfig interface.... ServletConfig stores initial parameters and ServletContext stores global data
servlets - Servlet Interview Questions
. For more information on ServletContext and ServletConfig visit to : http... is,what is the difference between servletcex and servletconfig(full flezed answer plz).thank u in advance.  Hi friend, ServletContext
JAVA - JSP-Servlet
ServletConfig and ServletContext object? mail: [email protected]  Hi Friend, Differences: 1)ServletContext object is shared by all of the servlet instances within the context whereas ServletConfig object is created
constructor in servlet
a ServletConfig. That no longer applies, but servlet containers still will only call your no-arg constructor. So you won't have access to a ServletConfig or ServletContext
java - JSP-Servlet
Java Servlet Config means   What is Servlet Config means ?  ServletContext and ServletConfig Tutorials And Example CodeServletConfighttp://www.roseindia.net/servlets/MethodsOfServlets.shtmlServletContexthttp
Servlet - Servlet Interview Questions
can be implemented. They are RequestDispatcher Servlet ServletConfig ServletContext ServletRequest ServletResponse SingleThreadModel Where
Servlets - Java Interview Questions
config?  Hi friend, ServletContext It defines a set... is contained within the ServletConfig object. Specifies the param-value pairs for ServletContext object in tags in web.xml file. These parameters
java profram:error 405 method not found
extends HttpServlet { ServletConfig con; ServletContext ctx; public void... the following link: ServletConfig Example Thanks   thanx now it got
How to find a servlet object by name?
by calling getServletNames on the ServletContext object. ServletContext is available through the ServletConfig object's getServletContext method. After obtaining
QuickImage 0.2.0
ServletContextListener example
; ServletContextListener we should understand what is ServletContext. ServletContext is a interface which helps us to communicate with the servlet container. There is only one ServletContext for the entire web application
Getting Context Parameter Names
in the web.xml file. ServletContext is a interface which helps us to communicate... of ServletContext. Its the responsibility of the Container to give the reference of the ServletContext to the context init parameters. The servlet and jsp which
Steps not found.
out = response.getWriter(); ServletContext ctx=getServletContext(); ServletConfig con=getServletConfig(); out.println("<html>
ServletContextAttributeListener
. The elements of the ServletContext are stored in web.xml file. Whenever...; tag should appear before the Servlet tags.  ServletContext is a interface... ServletContext for the entire web application and the components of the web
The getServletContext() method and its uses with example
Description: ServletContext is an interface found in javax.servlet package... container like dispatch request or write the log file. The ServletConfig object hold the ServletContext object which is provided by the web server when
java - Java Interview Questions
a ServletContext object that you can use to access information about... parameters. ServletConfig A servlet configuration object used by a servlet
java - Servlet Interview Questions
java  Which interface or class is implementing or extending ServletContext interface
what is web .config method
(ServletConfig config), then make sure to call super.init(config). Why servlet context is used but not ServletConfig what is use of the servletconfig ServletContext is used to hold information about the application. One object serve whole
How to use web.xml in Servlet 3.0
;); ServletConfig config = getServletConfig(); ServletContext context = getServletContext... there is no any annotation is defined for the ServletContext. Example :ADS
Java Servlet addCookie Example
have taken a ServletConfig and ServletContext references which will help... { ServletConfig config = getServletConfig(); ServletContext context...(request.getParameter("secondNumber")); int result; ServletConfig
What is wrong with my servlet?
public void init(ServletConfig conf) throws ServletException..."; ServletContext sc = getServletContext(); RequestDispatcher rd...); String url="Checkout.jsp"; ServletContext sc
setInitParameter() Method Example
of ServletContext is used to set the context initialization parameter... ServletException, IOException { ServletConfig config= getServletConfig(); ServletContext context= getServletContext(); context.setInitParameter("
java
; PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page
Servlet Training Overview
the servlet container's perspective.  ServletConfig Define Servlet Config ServletConfig methods  ServletContext: Sharing the data (attribute scopes) 
Servlet Interview Questions - Page 2
-cycle methods. These are: public void init(ServletConfig config) throws... Question: What is ServletContext? Answer: ServletContext
struts(DWR) - Ajax
extends HttpServlet { private ServletContext context; private String sub_classes=null; public void init(ServletConfig config) throws
Servlet setAttribute & getAttribute method example
() method. These methods can be used with ServletConfig, HttpSession...("Name", name); ServletContext context= getServletContext
Fetching database field from servlet to jsp page ?
final long serialVersionUID = 1L; public void init(ServletConfig config...); ServletContext context = getServletContext(); RequestDispatcher rd
advance java
we should use it in our program?   Hi Friend, ServletContext... has only one ServletContext, which is accessible to all the active resources of that application. The ServletContext can also be used by the servlets to share
java - Java Interview Questions
that implements the ServletConfig interface. Also, Java doesn't allow interfaces... declare a constructor that accepts a ServletConfig parameter. It has to declare... to the ServletConfig object or the ability to throw a ServletException

Ads