在使用存储其值的变量之后,我有很多对象在上下文中存储对象 。 经过一些处理后,我想从上下文中删除该对象。从servlet中删除上下文属性
例如:
ServletContext context = getServletContext();
boolean chk;
chk=true;
// save that value in context attribute
context.setAttribute("myArray",chk);
// after it used no need to require that object
// so how can I remove that object from the context?
if(somecondition){
// I want to remove myArray attribute from context
}
那么,怎样才能执行该任务?