The following passage refers to the joy (not happiness) that Jesus knew He would have once He endured the cross. He had a promise that He could look forward to receiving that helped Him endure the race of faith.
Therefore we also, since we are surrounded by so great a cloud of witnesses, let us lay aside every weight, and the sin which so easily ensnares us,and let us run with endurance the race that is set before us, looking unto Jesus, the author and finisher of our faith, who for the joy that was set before Him endured the cross, despising the shame, and has sat down at the right hand of the throne of God.
The following goes on to explain one of the best teachings I have ever heard on discipline from a father.
If you endure chastening, God deals with you as with sons; for what son is there whom a father does not chasten? But if you are without chastening, of which all have become partakers, then you are illegitimate and not sons.Furthermore, we have had human fathers who corrected us, and we paidthem respect. Shall we not much more readily be in subjection to the Father of spirits and live? For they indeed for a few days chastened us as seemed best to them, but He for our profit, that we may be partakers of His holiness. Now no chastening seems to be joyful for the present, but painful; nevertheless, afterward it yields the peaceable fruit of righteousness to those who have been trained by it. Therefore strengthen the hands which hang down, and the feeble knees, and make straight paths for your feet, so that what is lame may not be dislocated, but rather be healed. Hebrews 12:3-12