Home Answers Viewqa JSP-Servlet ServletConfig and ServletContext

 
 


Poonam
ServletConfig and ServletContext
1 Answer(s)      3 years and 6 months ago
Posted in : JSP-Servlet

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 Pages:
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
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
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
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
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 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
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, ServletContext interface is a window for a servlet to view.... Every web application has one and only one ServletContext and is accessible to all
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
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
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: balla.rajaramesh@gmail.com  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
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
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
there is no any annotation is defined for the ServletContext. Example...(); String url = getInitParameter("URL"); ServletConfig config = getServletConfig(); ServletContext context = getServletContext(); String uid
java - Servlet Interview Questions
java  Which interface or class is implementing or extending ServletContext interface
Java Servlet addCookie Example
a ServletConfig and ServletContext references which will help in to carry...(request.getParameter("secondNumber")); int result; ServletConfig config= getServletConfig(); ServletContext context= config.getServletContext
setInitParameter() Method Example
{ ServletConfig config= getServletConfig(); ServletContext context= getServletContext... of ServletContext is used to set the context initialization parameter
What is wrong with my servlet?
public void init(ServletConfig conf) throws ServletException..."; ServletContext sc = getServletContext(); RequestDispatcher rd...); String url="Checkout.jsp"; ServletContext sc
java
; PageContext pageContext = null; HttpSession session = null; ServletContext application = null; ServletConfig config = null; JspWriter out = null; Object page
Servlet Training Overview
ServletConfig Define Servlet Config ServletConfig methods  ServletContext: Sharing
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"); request.setAttribute("Name", name); ServletContext context
Servlet Interview Questions - Page 2
-cycle methods. These are: public void init(ServletConfig config) throws... Question: What is ServletContext? Answer: ServletContext is an Interface
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
generic servlet
generic servlet  methods generic servlet    destroy() getInitParameter(java.lang.String name) getInitParameterNames() getServletConfig() getServletContext() getServletInfo() getServletName() init() init(ServletConfig
servlet config
servlet config  Dear friend plz tell the Purpose of ServletConfig?? supose if v write sample application .say... hello world in this wat could be the init parameter need to pass !!r plz expalin some sample app where u used
servlet config
servlet config  Dear friend plz tell the Purpose of ServletConfig?? supose if v write sample application .say... hello world in this wat could be the init parameter need to pass !!r plz expalin some sample app where u used

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.