If a king will arise from the House of David who diligently contemplates the Torah and observes its mitzvot as prescribed by the Written Law and the Oral Law as David, his ancestor, will compel all of Israel to walk in (the way of the Torah) and rectify the breaches in its observance, and fight the wars of God, we may, with assurance, consider him Mashiach.
If he succeeds in the above, builds the Temple in its place, and gathers the dispersed of Israel, he is definitely the Mashiach.
He will then improve the entire world, motivating all the nations to serve God together, as Tzephaniah 3:9 states: 'I will transform the peoples to a purer language that they all will call upon the name of God and serve Him with one purpose.'
If he did not succeed to this degree or was killed, he surely is not the redeemer promised by the Torah. Rather, he should be considered as all the other proper and complete kings of the Davidic dynasty who died. God caused him to arise only to test the many, as Daniel 11:35 states: 'And some of the wise men will stumble, to try them, to refine, and to clarify until the appointed time, because the set time is in the future.'
Jesus of Nazareth who aspired to be the Mashiach and was executed by the court was also alluded to in Daniel's prophecies, as ibid. 11:14 states: 'The vulgar among your people shall exalt themselves in an attempt to fulfill the vision, but they shall stumble.'
Can there be a greater stumbling block than Christianity? All the prophets spoke of Mashiach as the redeemer of Israel and their savior who would gather their dispersed and strengthen their observance of the mitzvot. In contrast, Christianity caused the Jews to be slain by the sword, their remnants to be scattered and humbled, the Torah to be altered, and the majority of the world to err and serve a god other than the Lord.
Nevertheless, the intent of the Creator of the world is not within the power of man to comprehend, for His ways are not our ways, nor are His thoughts, our thoughts. Ultimately, all the deeds of Jesus of Nazareth and that Ishmaelite who arose after him will only serve to prepare the way for Mashiach's coming and the improvement of the entire world, motivating the nations to serve God together as Tzephaniah 3:9 states: 'I will transform the peoples to a purer language that they all will call upon the name of God and serve Him with one purpose.'
How will this come about? The entire world has already become filled with the mention of Mashiach, Torah, and mitzvot. These matters have been spread to the furthermost islands to many stubborn-hearted nations. They discuss these matters and the mitzvot of the Torah, saying: 'These mitzvot were true, but were already negated in the present age and are not applicable for all time.'
Others say: 'Implied in the mitzvot are hidden concepts that can not be understood simply. The Mashiach has already come and revealed those hidden truths.'
When the true Messianic king will arise and prove successful, his position becoming exalted and uplifted, they will all return and realize that their ancestors endowed them with a false heritage and their prophets and ancestors caused them to err.