((integer) (request.getattribute ("totalpagenum")) is converted to an integer type.
. IntValue () converts the integer type to int type again,
Finally, assign a totalPageNum variable.