Also you'll need to go with some different shocks. If you're using stock shocks, then you're going to run out of travel on them before you run out of suspension.
If by "spacer" you mean a lift block under the rear leaf springs, i'd suggest going a different route, mainly due to the risk of axle wrap. However, If the spacers are for up front, then you'll be fine. I may suggest a track bar relocation bracket. They are all over the web for about 20.\, and super easy to install. This will help keep the front axle centered as you lift it, but they're only good for lifts up to 2-3". After the lift your steering wheel will be out of alignment (off center in rotation) but its easy to correct, by just loosening the drag link adjuster and giving it a turn or two.
And again, if you're going with 2" or more lift, I'd recommend getting some aftermarket shocks. I HAVE HEARD that JK shocks will work as a direct swap if you can find someone giving away a set, or at a junkyard. Craigslist usually has a good source of used lift components for XJ's. Good luck!