Jesus taught that prayer must be in His name (John 14:12-14; 15:7, 16; 16:23, 24).
In these verses Jesus teaches clearly that if we expect to receive what we ask for we must ask for those things in His name. What does that mean? Well, in the first passage (Jn. 14:10-14), Jesus shows us that praying in His name is praying in oneness or in unity with Him—that just as Jesus is one with the Father, we demonstrate that we are one with Jesus (and the Father) when we pray in His name. For when Jesus ascended to the Father, the Holy Spirit came to us and united us with the Father and Son. And so when we pray in His name we demonstrate our oneness with Him, because we pray in unity with the Son who is one with the Father. And we do it by the Spirit. Then the result will be that the Father is glorified. Moreover, when Jesus was on earth and was one with the Father, the Father did the work in Him (v. 10). So now when we are united to the Son (who is united to the Father), He does the work in us (by the Holy Spirit) to bring the answers to our prayers (v. 13).
In John 15:5-7 Jesus talks about abiding in Him, that if we abide in Him He will give us whatever we wish for. Here abiding isn’t something different than praying in His name. It is exactly the same. Abiding is how we pray in His name. For when we abide in Him we in effect are setting aside our own name and identity and we are receiving His name and identity. Thus when we pray in His name we are uniting ourselves with Him and we are claiming all that is His—just as a wife does when she marries and takes on the name of her husband. Here in these verses, the illustration of a vine and its branches has the same application. We may claim in prayer and take all that Jesus gives us because we are united with Him just as a branch is united to the vine.
In John 15:16 Jesus continues teaching on prayer using the illustration of the vine and the branches, but here He speaks also of the fruit produced. Now there are at least two possible interpretations here. First, some commentators say that if we abide in Christ, which will result in bearing fruit, then God will give us whatever we ask for (as a reward). The Second possible meaning is that if we abide in Him, then He will give us whatever we ask for, which will result in fruit.
I tend to go along with the second meaning. I think we first must abide in Christ; then when we grow in our relationship with Him we will see more and more answers to prayer; and then the result of our growth in the Word and in prayer will be that fruit will develop.
I like the way G. Campbell Morgan has interpreted this verse in His commentary. He says that there are two things that the Father has appointed us for: to bear fruit, and to asking. The ultimate, he says is to bear fruit, and the secret behind bearing fruit is asking. So he suggests that the verse should be understood as such: “I chose you in order to bear fruit, and in order that you may do so I chose you to ask, and so to get in touch with God, that fruit may abound.”
Now what is fruit? It is a new believer. Then it is the godly attributes of that believer. Generally it is righteous behavior: good works, praise, thanksgiving, and obedience. So what we are saying is that fruit is really the result of our abiding in Him and the prayers that we pray in His name.
Accordingly, I reject the NIV, which suggests the first view. I think the NKJV is better, because this rendering tends to make the fruit the end result rather then the asking and receiving.
The last passage, in John 16:24, speaks of the joy we will get when we ask in His name and receive. Here I think our joy is not so much in the things we receive from God when we ask in His name, but in God Himself who gives things. Real joy never comes from things. The fullness of joy here is in the experience of God; it is the thankfulness we feel; it is the kindness of God that we experience when we receive His answer to our prayer.