Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-28-2007, 04:20 AM
bbq bbq is offline
Senior Member
 
Join Date: Jun 2007
Posts: 134
Rep Power: 0
bbq is on a distinguished road
Default 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
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 06-28-2007, 06:38 PM
Member
 
Join Date: Jun 2007
Posts: 6
Rep Power: 0
Revelation is on a distinguished road
Default
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.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
accessing instance variables from static methods ravian New To Java 7 03-01-2009 11:09 PM
Using Static Variables Java Tip java.lang 0 04-17-2008 12:08 AM
Local Variables for a static method - thread safe? mikeg1z Advanced Java 1 11-16-2007 02:06 AM
significance of static variables and methods imran_khan New To Java 4 08-02-2007 10:52 AM
Error: non-static variable height cannot be referenced from a static context at line fernando AWT / Swing 1 08-01-2007 10:25 PM


All times are GMT +2. The time now is 12:47 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org