Confucianism is respecting authority, educating others, and having better behavior. They promote being a good example so it can teach others to do the same. They thought this will stop crimes.
Legalism is punishing people for petty crimes with very hard punishments. It promotes very strict law, harshness, and order. Peasants couldn't leave without a permit and if farmers didn't grow a certain amount of food they would be punished with slave labor work.
Taoism is focusing on yourself and behavior. You go with the flow and try to be one with the Tao. They believe that if people focus on striving there would be no war, envy, and less suffering.