• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Register and obtain information with JVM

 
Andrew Cly
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In servlet code, can we register a piece of information with the
underlying JVM, and retrieve it later (by another web module servlet)?

If a servlet in one web module registered some information with JVM, then
a servlet in another web module can read that information out during
init() time, and know the existence of the former servlet. The two
servlets can even be the same class but deployed in two web modules.

Can we do that in our code? Or it is generally impossible because the
servlet container will disable such communication?

Thanks,
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might try the java.lang.System setProperty() and getProperty() methods but the SecurityManager settings may not let you do that.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic