Results 1 to 2 of 2
Thread: Help with static variables
- 06-28-2007, 03:20 AM #1
Senior Member
- Join Date
- Jun 2007
- Posts
- 132
- Rep Power
- 0
Help with static variables
I'm developing a web application using Tomcat 4.1 on windows XP.
On login I calculate the path of my application using
application.getRealPath(request.getContextPath())
and store this value in a static variable of a class.
Now I want to know whether this value will be set throughout the session
thanks
bbq
- 06-28-2007, 05:38 PM #2
Member
- Join Date
- Jun 2007
- Posts
- 6
- Rep Power
- 0
why is it that everything you ask sounds like its coming from text book questions?
And I would say that value will remain throughout the session unless it loses scope. So if it has global scope to the class its gonna stay resident. If it has functional scope, its only going to be resident during the execution of that function.
Similar Threads
-
accessing instance variables from static methods
By ravian in forum New To JavaReplies: 7Last Post: 03-01-2009, 10:09 PM -
Using Static Variables
By Java Tip in forum java.langReplies: 0Last Post: 04-16-2008, 11:08 PM -
Local Variables for a static method - thread safe?
By mikeg1z in forum Advanced JavaReplies: 1Last Post: 11-16-2007, 01:06 AM -
significance of static variables and methods
By imran_khan in forum New To JavaReplies: 4Last Post: 08-02-2007, 09:52 AM -
Error: non-static variable height cannot be referenced from a static context at line
By fernando in forum AWT / SwingReplies: 1Last Post: 08-01-2007, 09:25 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks