// Get the context object ServletContext context = request.getServletContext(); // Set an attribute context.setAttribute("message", "Hello, world!"); // Remove the attribute context.removeAttribute("message");In this example, we first get the ServletContext object from the HttpServletRequest. Then, we set an attribute called "message" with a value of "Hello, world!". Finally, we remove the attribute using the removeAttribute method. The removeAttribute method is useful when you want to remove a context attribute that is no longer needed. This can help to reduce the amount of memory used by your application. The javax.servlet package is part of the Java Servlet API, which is included in most Java application servers such as Tomcat and Jetty.