Story of Jajali is found in the Shanti Parva of the
Mahabharata and it said that birds used to build nests on his matted hair. Sage Jajali practiced penance from his childhood by staying in a dense forest. He was not deterred by rain, sun, wind etc.
Once he stood like a pillar in the forest, immersed in
meditation. Two birds made their nests on his matted hair. He did not move, as
that would become himsa or violence. The birds came to their nests every
evening and stayed for the night. After a few days, the female bird laid eggs
in the nest. The eggs hatched and still the sage did not move.
The young ones got wings. They grew up and began to go out
with the parent birds. They went out in the morning and returned in the
evening. The hermit stood like a pillar.
One morning they went out and did not return in the evening.
The hermit stood there for six days waiting for the return of the birds. On the
sixth day evening, they returned. Next time the hermit waited for a month for
the return of the birds. They did not return.
So he moved from there and went to the sea and dipped in the
water and said, "there is no man more virtuous than I either in water or
on land" with haughtiness. But the water demons said in an ethereal voice
that Tuladhara, the merchant of Kasi, was more virtuous than he.
Hearing this Jajali went to Kasi and saw Tuladhara. Tuladhara
greeted him gladly and they talked for a long time. Jajali understood that
Tuladhara was far more virtuous than him. He performed all his duties without ever thinking about the results. He found neither happiness nor aversion or sadness in anything. He performed his duties with utmost dedication without any kind of attachment. So Jajali sought advice from Tuladhara and
thus Jalali obtained heaven.