Even the Pandava brothers had spent some part of the term of their exile in the forests before the Mahabharata war.
The Pandavas' exile included periods spent in the forests prior to the Mahabharata war.