From: Matthew 7:21, 24-27
Doing the Will of God
(Jesus said to His disciples,)  "Not every one who says to Me, `Lord, Lord,' shall enter the Kingdom of Heaven, but he who does the will of My Father who is in Heaven.
Building on Rock
 "Every one then who hears these words of Mine and does them will be like a wise man who built his house upon the rock;  and the rain fell, and the floods came, and the winds blew and beat upon that house, but it did not fall, because it had been founded on the rock. And every one who hears these words of Mine and does not do them will be like a foolish man who built his house upon the sand;  and the rain fell, and the floods came, and winds blew and beat against that house, and it fell; and great was the fall of it."
21-23. To be genuine, prayer must be accompanied by a persevering effort to do God's will. Similarly, in order to do His will it is not enough to speak about the things of God: there must be consistency between what one preaches--what one says--and what one does: "The Kingdom of God does not consist in talk but in power" (1 Corinthians 4:20); "Be doers of the word, not hearers only, deceiving yourselves" (James 1:22).
Christians, "holding loyally to the Gospel, enriched by its resources, and joining forces with all who love and practise justice, have shouldered a weighty task on earth and they must render an account of it to Him who will judge all men on the last day. Not every one who says `Lord, Lord' will enter the Kingdom of Heaven, but those who do the will of the Father, and who manfully put their hands to the work" (Vatican II, "Gaudium Et Spes", 93).
To enter the Kingdom of Heaven, to be holy, it is not enough, then, to speak eloquently about holiness. One has to practise what one preaches, to produce fruit which accords with one's words. Fray Luis de Leon puts it very graphically: "Notice that to be a good Christian it is not enough just to pray and fast and hear Mass; God must find you faithful, like another Job or Abraham, in times of tribulation" ("Guide for Sinners", Book 1, Part 2, Chapter 21).
Even if a person exercises an ecclesiastical ministry that does not assure his holiness; he needs to practice the virtues he preaches. Besides, we know from experience that any Christian (clerical, religious or lay) who does not strive to act in accordance with the demands of the faith he professes, begins to weaken in his faith and eventually parts company also with the teaching of the Church. Anyone who does not live in accordance with what he says, ends up saying things which are contrary to faith.
The authority with which Jesus speaks in these verses reveals Him as sovereign Judge of the living and the dead. No Old Testament prophet ever spoke with this authority.
22. "That day": a technical formula in biblical language meaning the day of the Judgment of the Lord or the Last Judgment.
23. This passage refers to the Judgment where Jesus will be the Judge. The sacred text uses a verb which means the public proclamation of a truth. Since in this case Jesus Christ is the Judge who makes the declaration, it takes the form of a judicial sentence.
24-27. These verses constitute the positive side of the previous passage. A person who tries to put Christ's teaching into practice, even if he experiences personal difficulties or lives during times of upheaval in the life of the Church or is surrounded by error, will stay firm in the faith, like the wise man who builds his house on rock.
Also, if we are to stay strong in times of difficulty, we need, when things are calm and peaceful, to accept little contradictions with a good grace, to be very refined in our relationship with God and with others, and to perform the duties of our state in life in a spirit of loyalty and abnegation. By acting in this way we are laying down a good foundation, maintaining the edifice of our spiritual life and repairing any cracks which make their appearance.
Source: "The Navarre Bible: Text and Commentaries". Biblical text taken from the Revised Standard Version and New Vulgate. Commentaries made by members of the Faculty of Theology of the University of Navarre, Spain. Published by Four Courts Press, Kill Lane, Blackrock, Co. Dublin, Ireland. Reprinted with permission from Four Courts Press and Scepter Publishers, the U.S. publisher.