Even the Pandava brothers had spent some part of the term of their exile in the forests before the Mahabharata war.
This sentence implies that the Pandava brothers were exiled and lived in the forests for a period before the events of the Mahabharata war.