All attributes stored in the request are strings. You will have to manually cast it to whatever type they are.
For example you are trying to get a boolean attribute from the request. You will have to do this:
String attr = request.getAttribute("nameOfAttribute");
Boolean bool = Boolean.getBoolean(attr);