The JMT starts in Yosemite Valley - there’s a backpacker’s camp there for the night before you start out. After about a 4 mile climb out of the Valley, past Nevada Falls, you get to the Little Yosemite Valley campground that requires a permit. This is en route to Half Dome. It’s a few (?@) more miles from there to Half Dome. The JMT goes about half along the route to Half Dome, then splits off. If you’re backpacking, there are camp spots , I’m not sure where.
If you have a backpacking wilderness permit, you don’t need a permit to do Half Dome - that’s only needed for day hikers on Fridays, Sats and Sundays. Tho the rangers are reconsidering how to deal with Half Dome, so more regulations may emerge.
If you’re doing the JMT, you probably won’t want to do Half Dome then go back to the Valley to restart the JMT! That is a lot of work! Cheers-
Barbara