These verses don't mean that we will receive any thing we ask God for! This scripture means that God will grant us what He knows and understands we need -- either in the present moment or as preparation for the future.
Our job is to pray for obedience, strength, courage to accept any trouble, hardship, or circumstance we may be experiencing. As we look back over our lives hasn't God used our past experiences to prepare us for this day? Doesn't He uplift and strengthen us to endure whatever current hardship we are going through in the moment?
The faith James admonishes us to have is faith that God will continue to grant His good and perfect will for our lives. And that we will lean on Him to live out His will for our lives.
"[By Faith] Now faith is being sure of what we hope for and certain of what we do not see" (Hebrews 11:1 NIV).
Blessings on your journey,
MaryBlessings on your journey,