This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have create an Object and Placed in the context using "getServletContext().setAttribute("x", xyz)" in a servlet. Now I want to access the same from the servlet context in a bean/class. How it can be done? Thanks
The only way to do it is to pass the servlet context object to your class. You could pass it in in the constructor and hold onto it for the lifetime of the instance, or pass it in through another method. Kyle