i am removing some attributes from ServletActionContext bu later on when i iterate the ServletActionContext the attributes keep showing.
ServletActionContext.getRequest().removeAttribute("myCategory");
ServletActionContext.getRequest().removeAttribute("title");
for (Enumeration e = ServletActionContext.getRequest().getParameterNames(); e.hasMoreElements();) {
parameterName = (String) e.nextElement();
parameterValue = ServletActionContext.getRequest().getParameter(parameterName);
System.out.println(parameterName +":"+ parameterValue);
}
and console keeps showing me myCategory:something and title:otherthing
can any one see what is wrong ?
What you removed is
attribute, but you are displayingparamater. These are two difference variables.Check ServletRequest.getParameterNames() and ServletRequest.getAttributeNames()