What did Jesus mean when he told his followers that "whatever" they asked in his name would be granted? Did he literally mean that Christians could pray for "anything" and the prayer would be answered? That would not seem to make sense in view of 1 John 5:14-15. Furthermore, here is what certain exegetes have to say about the passage in the Gospel of John:
"Joh 14:13 -
Whatsoever ye shall ask - This promise referred particularly to the apostles in their work of spreading the gospel; it is, however, true of all Christians, if what they ask is in faith, and according to the will of God, Jam_1:6; 1Jo_5:14" (Albert Barnes).
How, then, are we to understand "Whatsoever you shall ask, I will do it," if there are some things which the faithful ask, and which God, even purposely on their behalf, leaves undone? Or ought we to suppose that the words were addressed only to the apostles? Surely not. For what He has got the length of now saying is in the very line of what He had said before: "He that believes in me, the works that I do shall he do also; and greater works than these shall he do;" which was the subject of our previous discourse. And that no one might attribute such power to himself, but rather to make it manifest that even these greater works were done by Himself, He proceeded to say,"For I go to the Father; and whatsoever you shall ask in my name, I will do it." Was it the apostles only that believed on Him? When, therefore, He said, "He that believes in me," He spoke to those, among whom we also by His grace are included, who by no means receive everything that we ask. And if we turn our thoughts even to the most blessed apostles, we find that he who labored more than they all, yet not he, but the grace of God that was with him, besought the Lord thrice that the messenger of Satan might depart from him, and received not what he had asked. What shall we say, beloved? Are we to suppose that the promise here made, "Whatsoever you shall ask in my name, I will do it," was not fulfilled by Him even to the apostles? And to whom, then, will ever His promise be fulfilled, if therein He has deceived His own apostles?
The last quote is from Augustine's _Tractate_ 73.2.