James Webb will be in a halo orbit, station keeping around the Sun-Earth L2 point. This means it needs to monitor its position with regard to L2, for periodic station keeping purposes.
But L2 isn't an object in space that it's orbiting. Its path is better described as a cyclical path round a point moving through space, that has no visible marker, and is identified by its property that it's a gravitational saddle point. But that feature doesn't have any specific prominent physical markings to identify it, and gravity probably doesn't change massively sharply at the saddle either.
From almost half a million miles away, I'm unclear the gravitational gradient at JWST is sufficient to identify with precision, where it is, relative to L2, enough for station keeping in its orbit. Perhaps it does just use very precise detectors of the local gravitational field, but how it obtains station keeping adjustment data from that alone still isn't clear, if so.
So how does JWST (or more accurately its ground control) identify station keeping corrections?
Update: to clarify, I'm mainly looking for answers with a list of "(item actually measured) to within (X amount/%) by (details of technique/method and how achieved)", and how those are then combined/used to produce an accurate enough location w.r.t. L2. Plus any interesting/relevant detail about it, or about the techniques used.
Update 2: clarifying "ground control", I meant JW overall, not assuming at all that its done onboard the observatory. That wasn't clear, so I've fixed it.