Also Joshua the son of Nun was persecuted as Jesus our Redeemer was persecuted. Joshua the son of Nun was persecuted by the unclean nations; and Jesus our Redeemer was persecuted by the foolish people. Joshua the son of Nun took away the inheritance from his persecutors and gave it to his people; and Jesus our Redeemer took away the inheritance from His persecutors and gave it to strange nations. Joshua the son of Nun caused the sun to stand still in the heavens, and took vengeance on the nations his persecutors; and Jesus our Redeemer caused the sun to set in the midst of the day, that the persecuting people which crucified Him might be ashamed. Joshua the son of Nun divided the inheritance unto his people; and Jesus our Redeemer has promised to give to the nations the land of life. Joshua the son of Nun caused Rahab the harlot to live; and Jesus our Redeemer gathered together and gave life to the Church, though polluted by the harlotry (of idolatry). Joshua the son of Nun on the seventh day overthrew and cast down the walls of Jericho; and Jesus our Redeemer, on His seventh day, on the Sabbath of the rest of God, this world shall be dissolved and fall. Joshua the son of Nun stoned Achor, because he stole of the accursed thing; and Jesus our Redeemer separated Judas from the disciples, His friends, because he stole of the money of the poor. Joshua the son of Nun, when he was dying, laid down a testimony among his people; and Jesus our Redeemer, when He was taken up, laid down a testimony among His apostles.
Joshua 6:17
17 And the city shall be accursed, even it, and all that are therein, to the LORD: only Rahab the harlot shall live, she and all that are with her in the house, because she hid the messengers that we sent.
Commentaries
Pay attention to me; how strange was the preaching of God's love toward humanity! He who says in the law, "You shall not commit adultery" and "You shall not commit prostitution," changes the commandment by clemency and proclaims through the blessed Joshua, "Let Rahab the prostitute live." Joshua the son of Nun, who says, "Let the prostitute live," prefigured the Lord Jesus, who says, "The prostitutes and tax collectors go into the kingdom of the heavens before you." If she must live, how can she be a prostitute? If she is a prostitute, why should she live? "I speak about her previous condition," he says, "so you may marvel at her subsequent change." He asks, "What did Rahab, to whom he granted salvation, do?" She accepted the spies peacefully? Even an innkeeper does this. However, she reaped the fruits of salvation not only by speech but beforehand by faith and by her disposition before God.And so you may learn the abundance of her faith, listen to the very Scripture that describes in full and bears witness to her achievements. She was in a brothel, like a pearl mixed up in mire, like gold thrown in mud, the rose of piety hidden in thorns, a pious soul enclosed in a place of impiety. Pay attention so you may understand well. She accepted the spies and the One whom Israel denied in the desert; Rahab preached this One in the brothel.
Source: HOMILIES ON REPENTANCE AND ALMSGIVING 7.5.15-16
Certain things are found in Scripture that correspond to these seven parts, such as that which is read in Joshua (Josh. 6:6 and following), where the Lord commanded that the ark of God should go around the city of Jericho for seven days, once each day, with the priests carrying it, the trumpets sounding, and the people following. For Jericho signifies the whole body of the depraved, which is the city of the Devil; by the children of Israel, the elect are signified; by the priests, the preachers; by the trumpets, the doctrine of preaching; by the people who followed them, all the righteous are signified, who followed their teaching and imitated their deeds; by the ark which they carried, Christ is understood, who is borne by the saints, dwelling in their hearts. Concerning the preachers who were after the coming of Christ, there is no doubt that they carried Christ not only by preaching him with their tongue, but also by loving him in their heart. But those who preceded his coming, how did they carry him? They too indeed carried him; for some of them foretold him with words, some prefigured him by deeds. Now we must ask what this going around, which was done for seven days, signifies. For when we go around a place, we avoid entering it; for when we travel along the road, if we find a pit or deep mud or some danger, by going around it, if we can, we avoid entering it, that we may escape the danger. We go around Jericho if we carry out the journey of the present life according to the will of God; for although we live among the wicked, we go around Jericho if we abstain from their wickedness. Of this going around the Psalmist seems to me to have spoken: I have gone around and sacrificed in his tabernacle a sacrifice of jubilation (Ps. 26:6). For he went around, and afterward he sacrificed; because he first despised the deeds of the wicked, so that his sacrifice of jubilation might become acceptable to God. For there are many who continually praise God; but because they are unwilling to drive vices away from themselves, the sacrifice of their praise is not acceptable to God. The first going around, then, refers to those righteous men who were before the Flood, who were called sons of God. They went around the city of Jericho as long as they kept themselves apart from the fellowship of the depraved. After the ark of God and the people went around the city of Jericho, they returned to the camp; because when the time of each righteous person’s going around is completed, he is led after death to the fellowship of the elect, which is the camp of the saints. The going around of the second day refers to those who lived after the Flood up to Moses: they too went around the city of Jericho; because they separated themselves from the sins of the depraved. For Abraham, although he lived among the Amorites, shrank not only from their vices but even from bodily association with them to such a degree that he was unwilling to take a wife for his son from among their daughters. And about Lot, who lived among the Sodomites, blessed Peter speaks (2 Peter 2:7), who was righteous in hearing and seeing, living among them who day by day tortured his righteous soul with their wicked deeds. In like manner the others as well. The third going around refers to those who were under the Law: with what zeal they ought to separate themselves from the fellowship of the wicked, the Law itself shows clearly. But the Prophets, to whom the fourth going around refers, so greatly despised and reproved the sins of rulers and wicked men that some of them were stoned for this, some were sawn in two, and some died by the slaughter of the sword. (Heb. 11:37) The Apostles, and those who believed from among the Jews, to whom the fifth going around refers, with what eagerness they separated themselves from the counsel and deeds of the unbelieving Jews, Luke relates in the Acts of the Apostles. The Gentiles, to whom the sixth going around refers, with what passion they separated themselves from the fellowship of the wicked, let the martyrs who were examined testify. The seventh going around refers to those who are to be in the times of Antichrist; and this book also shows how they will avoid the unbelief of Antichrist and his ministers. Therefore, when on the seventh day the priests went around Jericho with the ark, and raised a shout, the walls of Jericho fell, and all the people with their king were killed; because when, at the end of the world, the preachers of truth preach and announce the end of the world, suddenly the end of the world will come, and the whole city of the Devil will be destroyed, and with its head, the Devil himself, will be condemned to eternal death.
Source: Commentary on Revelation