It's no great mystery that to be successful, you must be willing to work hard and take risks. But that's not the most important quality successful people share. It's their response to failure.

They persevere. They fall, get up, and keep going. And that's what helps them eventually defy the odds.

Here are four entrepreneurs who experienced early setbacks--only to find success through perseverance:

1. Mark Cuban: Shark Tank Investor and Dallas Maverick's Owner

"It doesn't matter how many times you failed," Mark Cuban, Shark Tank investor and Dallas Maverick's owner, once told Smart Business. "You only have to be right once."

Things were not always so easy for Cuban. He has stated that he was fired from more jobs than most people ever had.

Before selling his computer consulting business to Yahoo and becoming a multi-billionaire, Mark Cuban failed at numerous jobs including working as a carpenter, cook, and waiter. Today, he is worth an estimated $2.3 billion.

2. Sara Blakely: Spanx

Sara Blakely, the founder of Spanx, says that when she was a child, her father would routinely ask her, "What have you failed at this week?" He taught her that it was okay to experience setbacks, and that real failure is not trying at all.

This concept helped Blakely become the youngest self-made female billionaire in the United States. She sold fax machines door-to-door before coming up with the idea for Spanx, the slimming shapewear for women that has become a global sensation and household name.

Blakely cites her lack of expertise about clothing and retail as being a major key to her success. She has stated that not knowing industry practices and trying things that supposedly can't be done were both critical in starting her business.

The childhood lesson about failure came in handy when the idea for Spanx was rejected by almost every manufacturer she met with over a period of two years.

3. J.K. Rowling: Harry Potter Franchise

Okay, so she's not a traditional entrepreneur. Still: J.K. Rowling was a single mom living off welfare when she began writing the first Harry Potter novel. She is now internationally renowned for the seven-book series and became the first billionaire author in 2004.

Rowling has expressed that she wishes she'd been taught early on how to handle failure. "It would've really helped to have someone who had had a measure of success come say to me, 'You will fail. That's inevitable. It's what you do with it,'" she stated to Today in 2015.

Rowling has said that she believes failure is a gift, as she learned valuable lessons about herself and her relationships through adversity. The first literary agent that she sent the Harry Potter manuscript to responded with a rejection. It went on to 12 different publishers before being accepted.

4. Jala Smith-Huys: Seek & Swoon

We often hear "big name" stories--people who "made it"--but not enough of mom-and-pop entrepreneurs. That's why I wanted to include the story of a small business owner here as well.

Jala Smith-Huys, owner of Seek & Swoon, designs cotton knit blanket throws made from recycled cotton and inspired by her travels. They are manufactured at an American family-owned and operated mill.

Just like Sara Blakely was new to the clothing and retail world, Smith-Huys was new to textiles and home decor when she first started. Finding a mill to produce her throws became a roadblock that set her back from launching her business for six months.

She knew the mills existed, but they were very hard to find. There very few left following the textile industry's recession in the mid-1990s, and there wasn't a directory of knitting mills to use as a resource. Many of them didn't come up in Google searches.

Searching for mills wasn't working, so she went after the equipment that the mills used to produce the throws. Through a series of emails and phone calls with the equipment manufacturers and consultants, she finally found one.

"It was unorthodox, but effective. I can be relentless when I know, for a fact, the answer is out there," said Smith-Huys. "Finding solutions is what entrepreneurs do. And I think anyone wanting to start a business needs to be committed to solving problems creatively, because there will be lots of them."

She's since expanded her product line to baby throws and custom wedding throws, and is in talks with boutique hotel chains about custom designs for their guest rooms.

The Takeaway

Success in business often comes after a series of failures or seemingly hard-to-overcome obstacles. Of course, not everyone has the resources or patience to continue to push for their business to succeed.

So how do you know when to quit and when to stick with it?

Don't take criticism too seriously. Be willing to tweak your idea and try something new. Keep trying until you get where you need to be.

Most importantly, if you believe in your product and know its potential worth, it's often enough to keep you reaching for success despite taking risks along the way.