Psalm 21:1 (ESV)

1 O LORD, in your strength the king rejoices, and in your salvation how greatly he exults!

The king rejoices in the Lord because of the power which the Lord has shown on his behalf. He rejoices at the salvation he received. You can think of a rescue from a situation of emergency. The two parts of the sentence are parallel. The second part of the sentence explains the first part a bit more. In the second part of the sentence, we read what the effect is of the power and the expression of joy mentioned in the first part.