This part of Jesus' private ministry has many connections with the preceding Upper Room Discourse. In the Old Testament, prayers often accompanied important farewell discourses (cf. Gen. 49; Deut. 32-33). The main theme is Jesus' desire for the Father's glory and the disciples' welfare. However many of the other themes that have run though this Gospel reach a new climax here too. These themes include Jesus' obedience to the Father, the revelation of God through the Son, the calling of the disciples out of the world, their mission, their unity, and their destiny.513
The similarities between the content of this prayer and the Upper Room Discourse, plus John's notation at its end (18:1), seem to indicate that Jesus prayed it before He entered Gethsemane. He probably prayed it in the upper room, though He may have done so somewhere else in Jerusalem.
"Whether He prayed it in the Upper Room or en route to the Garden, this much is sure: it is the greatest prayer ever prayed on earth and the greatest prayer recorded anywhere in Scripture. John 17 is certainly the holy of holies' of the Gospel record, and we must approach this chapter in a spirit of humility and worship."514
Though labeling this prayer "Jesus' high priestly prayer"is a bit misleading, I know of no better way to describe it. Obviously Jesus had not yet entered into His high priestly ministry, which He began when He ascended into heaven, when He prayed this prayer (cf. Rom. 8:34; Heb. 7:25; 1 John 2:1). This prayer, nevertheless, represents a foretaste of that intercessory ministry.
"We so often understand this prayer as though it were rather gloomy. It is not. It is uttered by One who has just affirmed that he has overcome the world (16:33), and it starts from this conviction. Jesus is looking forward to the cross, but in a mood of hope and joy, not one of despondency."515