Spongy brake pedal is usually caused by air getting into the system somehow, or gas bubbles from trapped water boiling off. First thing to do is bleed your brakes - if you don't know how long it's been since that was done, change your brake fluid entirely.
Use a vacuum bleeder kit. Start at the master cylinder - suction most of the fluid out (leave a bit on the bottom to cover the ports,) and wipe out the master cylinder with a CLEAN rag - no lint! Refill.
Working inwards (RR/LR/RF/LF,) vacuum bleed each wheel in turn. Make sure the master cylinder doesn't get sucked dry, and run the vacuum until you get clean fluid at the cylinder port (that's why the hoses in the bleeder kits are clear.) You'll want to use a six-point box-end wrench on the bleeder screws - they're usually 1/4" or 5/16" (I think the XJ ones are 5/16" up front, and 1/4" out back - but don't hold me to it.) Have a 3/8" handy, just in case I'm way wrong...