I need to use a properties file to replace variables in a Java program and a servlet.
Eg. of Java program: ****************************************************
**************************************************** The servlet:
******************************************************************** I want to put the stuff between @xyz@ in the above programs in a properties file and access them - how do i do it?
I want to stuff @xyz@ in the servlet to come from a init-param of the servlet defined in web.xml .
Question: Where should I put the properties file ? How do i access it(the variavles in the properties file) from java program? Do i need to put the properties file in the classpath?
Thanks Kawa
[EDIT code tags added by Dave] [ February 10, 2005: Message edited by: David O'Meara ]
Here's a pointer for you: SimpleDateFormat isn't thread safe! It should be but is not.
Don't make it a static final, create a new one each time you need it, or as a method variable (NOT an instance variable, this is a servlet we're talking about).
Just be glad you're not learning this the hard way!