This is related to a jsp web application..
Can I store object of some class as a context parameter and then write a listener for the context to initialize the object. How can I do this?
This is related to a jsp web application.. Can I store object of some
Share
Only if you know how to convert from
Stringto that instance. Init parameter values can only be strings, simply because they’re stored in a textbased file (XML). Pass it for example to the constructor of your object so that it can initialize its state based on it. E.g. by splitting the value on a comma and then setting several fields with it. You’ve all the freedom to write code accordingly.