Hi
I would like to share some information among all sessions for a specific project. Is there a way to do that?
For the environment variable defined in the deployment xml is that shared by all projects?
Thanks,
Xiaoli
global variable for a project.
Moderators: Jon, Steve, Ian, Dave
-
xren
- Ebase User
- Posts: 272
- Joined: Fri Dec 14, 2012 2:55 pm
- Location: Ottawa
-
Jon
- Moderator

- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
You do this by adding attributes to the web application context. These attributes are then available to all users e.g.
to set:
to read:
You only really need to do this if the attribute value is dynamic. If it's static, it's probably better to use environment variables. See Ebase standard documentation for details of using environment variables.
to set:
Code: Select all
client.httpSession.servletContext.setAttribute("ATTR1", "Hello World");Code: Select all
var attr1 = client.httpSession.servletContext.getAttribute("ATTR1");
0 x
Who is online
Users browsing this forum: No registered users and 44 guests