I am using java.lang.Properties class to store some data in my java bean class. When i am compiling, it goes fine.
But when i am invoking the JSP file which calls this bean,
the JSP error page is thrown, which says :
java.util.Properties: method setProperty(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/Object; not found
The relevant code from the bean class source is :
private String resourceId;
private String resourceContact;
private Properties resourceTable;
resourceTable = new Properties();
Could anyone please figure out why this code is compiling..
But throws a run time exception as given above.
Thanks in advace,
hope resourceId[i],resourceContact[i] are populated String
Yes I have populated them correctly. I think I identified the reason for this funny behaviour.
I developed and tested the bean class using JDK1.2 whose
JRE environment is version 1.2.2.
But for my JWS2.0, the JRE is version 1.1.7B.
Hence at JSP page processing time, JWS is using the JRE 1.1.7B, whose java.util.Properties has no method called
setProperty()!!!!!! This method is a new addition in the JRE 1.2.2. Hence the error. I used java.util.Hashtable
which is available and the error was solved.