This question might sound similar to
JSP or JavaScript equivalent to PHP's $_SERVER["HTTP_HOST"]?
But the answers to that questions are only about finding out HTTP_HOST.
I am wondering if it is possible to create Sever-wide global variables in JSP.
Example:
User 1 computes some user independent function X. It is likely that other users too might visit the application to compute X. One way would be I can save it in mySQL and for subsequent user requests do a db lookup. But I dont want to use any DB and my data should persist only during the lifetime of the server.
In PHP I could simple set $_SERVER['x]=value;
I was wondering if similar thing can be achieved in JSP.