In Psalm 9:2 David writes: “I will be glad and exult in You.” It is significant that he does not just say, “I will be glad and rejoice” — but, “I will be glad and rejoice IN YOU.” Those last two words are significant.
There are many times when there is not much reason to be glad in this world — unless one looks to the Lord. And that is what David does here. If you read the rest of the Psalm, it is apparent that he has some major problems. In :13 he says, “Be gracious to me, O LORD, see my affliction from those who hate me.” So while he was writing this Psalm, he was experiencing persecution from people who hated him — not much earthly reason for joy! But he DID find joy — NOT in his circumstances, but in His God.
Paul & Silas did the same thing. On their mission trip to Philippi, they were thrown into prison. But at midnight, they sang praises to God! They did not sing from a joy that was based on their circumstances, but in their God.
We will have many occasions on this earth when we are in a similar position: when our circumstances would leave us with no occasion for joy. In those times we need to do what David and Paul and Silas did: look to the LORD. If we will, we will find that despite what is going on around us, we can “be glad and exult” — not in our circumstances, but in Him!