| Author |
What are context attributes?
|
Sagar S Shah
Greenhorn
Joined: Jul 10, 2012
Posts: 6
|
|
I understand the context init parameters,servlet init parameters etc. but i dont seem to understand what context attributes exactly are and what are they used for???Can someone please explain it to me in simple words??
Thanks in advance.
|
 |
Gaurangkumar Khalasi
Ranch Hand
Joined: Jun 02, 2012
Posts: 186
|
|
Sagar S Shah wrote:Can someone please explain it to me in simple words??
Context init parameters -- attached with web application...
Servlet init parameters -- attached with a specific servlet...
|
 |
Sagar S Shah
Greenhorn
Joined: Jul 10, 2012
Posts: 6
|
|
Gaurangkumar Khalasi wrote:
Sagar S Shah wrote:Can someone please explain it to me in simple words??
Context init parameters -- attached with web application...
Servlet init parameters -- attached with a specific servlet...
yeah i get that...i want to know what are context attibutes.
|
 |
Gaurangkumar Khalasi
Ranch Hand
Joined: Jun 02, 2012
Posts: 186
|
|
Sagar S Shah wrote:...i want to know what are context attibutes.
Attributes which will be shared by servlets of a particular Web application...
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16487
|
|
Sagar S Shah wrote:yeah i get that...i want to know what are context attibutes.
They are attributes of the web application. Data items which are specific to the web application as a whole.
|
 |
Sagar S Shah
Greenhorn
Joined: Jul 10, 2012
Posts: 6
|
|
Are you guys saying that it is the data that is common to the entire web app???In that case how is it different from context init parameters??Also i think now i dont really understand what an attribute is.So what is an attibute exactly??
Thanks for all the help.
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56529
|
|
If by "attribute" you mean scoped variables that are set and fetched from the various contexts using setAttribute() and getAttribute(), then they are very different from context parameters.
Context parameters are set in the deployment descriptor and are static.
Scoped variables places in application context are set by code and can be changed at any time.
A better and unambiguous term is scoped variables.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: What are context attributes?
|
|
|