B
Bruno
Hi,
I know that in a standalone app, the Properties file should be used.
Also, when I'm using servlets, the method Servlet.getServletContext()
can help me out in setting these properties. But in my specific case,
I actually need to set the properties of some beans, not of a servlet.
For instance, I have a bean to access the persistent storage
layer, which is responsible for connecting and handling interactions
with the db. This bean needs to know the db username, url, etc in
order to get the work done. However, it is not a servlet, so it
doesn't make sense to turn it into one just to use the
getServletContext method.
So, the question is, how can those beans know their properties in a
Web app?
Thanks for any help!
I know that in a standalone app, the Properties file should be used.
Also, when I'm using servlets, the method Servlet.getServletContext()
can help me out in setting these properties. But in my specific case,
I actually need to set the properties of some beans, not of a servlet.
For instance, I have a bean to access the persistent storage
layer, which is responsible for connecting and handling interactions
with the db. This bean needs to know the db username, url, etc in
order to get the work done. However, it is not a servlet, so it
doesn't make sense to turn it into one just to use the
getServletContext method.
So, the question is, how can those beans know their properties in a
Web app?
Thanks for any help!