
can you give an example of how to use servlet context

Hi,
You can get the servlet context in your java application using following code:
ServletContext context = getServletContext();
Following code can be used to save the value in servlet context:
context .setAttribute("furniture", "My Furniture");
Check the examples:

Thanks alot
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.