Agree with Elevik. The sub will vibrate everything on the shelves and make every door rattle. Try your best to de-couple the sub from the cabinetry. The bottom shelf might work ok for your needs. All you can do is test and see. If there is space around the sub in the cabinet, you may need to add some foam.
Does the subwoofer have to be on the floor?
I plan on putting a home theater in my library. Ideally I would like to place the sub on the bottom most shelf of a cabinet, since all my walls are covered by shelves/cabinets. Also, the bottom most shelf still has two draws below it, would that interfere with the sound? The shelves and draws are very solid cherry wood.