Obviously you will need to decide this for yourself. Here are a few things that Hamlet observes as he thinks about Fortinbras and his command of his army to go Poland and fight for "a little patch of ground that hath in it no profit but the name." These are some of the qualities that he associates with greatness and heroism:
1. He admires the ambition of Fortinbras to take his army all the way to Poland to fight for worthless land.
2. He admires that Fortinbras dares danger and death for the fight.
3. He admires that Fortinbras is willing to fight for honor.
4. He acknowledges that perhaps 20,000 men are being lead by the strong and persuasive leader to their "immiment death" as easily as if their graves are their beds.
While Hamlet clearly sees how pointless the fight is in terms of material reward, he admires the emotional cause behind it, and it inspires the strongest language he uses in the play to this point. His final cry is inspired by Fortinbras's actions -- Hamlet says, "O, from this time forth, My thoughts be bloody, or be nothing worth."
You now need to decide if the "ends justifies the means" here.