Hi all,
How can I use global variables in
servlets? Like if I want some variables that can be accessed by all the servlets within the application. The variables can be read or written.
I looked into the forums and found two methods: using servletcontext and static.
They had their own disadvantages:
servletcontext: have problem with synchronization
static: they belong to a class and not to an application. ( I didn't get their exact disadvantages. Could someone tell me?)
Are there other methods for using global variables?
How about using database? Will I have synchronization problem?
thanks,
harke