Just an addition: when used in "on someone's way", both "на пути" and "по дороге" have the same meaning. Something like "on our way we saw trees and brush" -- "на пути/по дороге мы видели деревья и кусты".
There is a difference between по дороге and на дороге. The former is "on the way", the latter means "on the [surface of the] road". You can say "на дороге лежал ботинок" (a shoe lay on the road) and "по дороге мы видели ботинок лежащий на дороге" (on the way we saw a shoe laying on the road).
And you can't talk about a shoe like that using путь because it's a more general term as keinemeinung said.
Also sometimes путь is more formal or posh, say in the soviet times, there would always be talk about the way to communism and all -- that would more frequently be путь rather than дорога.