Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Application scope variable  RSS feed

 
Ruchik Bhatt
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all.
I have this problem, we can define an application scope varible in the deployment descriptor, but if we change its value then we need to restart tomcat..is there any other way to define an application scope variable ???
 
Dinesh Kumar
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The usual <%! int x = 10; %> or whatever variable you want to put inside.
Hope I'm correct. Any other suggestions?
 
Hari babu
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You can use ServletContext
Hari
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!