Hello,
I am developing a
struts application, and I want to have my database credentials configured. So I had put it in my web.xml under <context-param>. I have a listener class which reads these parameters and sets it to the ServletContext.
I have another
java class which will get the backend datbaase connection, here If I use "getServletContext().getAttribute("dbName");" I get an error "method getServletContext() is undefined for my class"
can anyone let me know how can I get the set ServletContext attributes in my "DbConnection" java files.
Thanks a lot in advance