... but can you even do that? Can you use class-static methods without an instance of the class?

I've toyed with the idea of adding getters for constants into the Globals class, and then placing an instance of that class into application-scope. What name should a person use though? If you use the typical method of doing this you wind up with a chicken and egg scenario in your pages. Of course, if we feel pretty satisfied that the location of the Globals probably isn't going to change again we could probably just decide that they will always be available under "org.apache.struts.GLOBALS" and be done with it. You could then get ahold of the instance easily - and use that instance to reference other objects.

Incidentally, I don't believe there are any getters in the Globals class.

David Graham wrote:

I see, so I have to do constants.getMyKey(). I guess that's easy enough.

David
--
Eddie Bush



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to