Sorry to be rather vague, I am new to Servlets and JSP but not to Java.
I kinda have early stage questions I need to ask, and then hopefully I can pick up on the details myself through further reading.
Just need a nudge in the right direction, which I think you have now given me.
I have coded in Java for a little while for GUI apps, but mainly in Php for Webapps.
I am keen to use my Java knowledge across the board to further improve my skills & knowledge, so would like to move away from Php entirely eventually.
In Php I use a class to define static app wide variables such as DOCUMENT_ROOT, EMAIL_DEFAULT_TO, WEBSITE_URL etc etc
So I just call these in where required and only have to edit these at one place in the WebApp if required, not have to go through all the classes and code.
Was looking for something similar in Java
As Bear suggested it depends on the scope/requirement you want them to be placed. There are runtime scopes like request, session, context etc.. and other ways like using properties files as well. But it all depends.