Story of Jajali is found in the Shanti Parva of the Mahabharat. Sage Jajali practices penance from his childhood and stayed in a forest. He was not deterred by rain, sun, wind etc.
Once he stood like a pillar in the forest, immersed in meditation. Two birds built their nests in 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 he. So he sought advice from Tuladhara and thus Jajali obtained heaven.