No doubt that diet+exercise is the way to go when it comes to long-term weight management. The thing is, "weight loss" in and of itself is a misleading metric. You're losing weight! Great! But hold on a minute - your gut is the same size but your biceps is smaller and your strength is way down. What happened? You lost weight alright but its muscle you're losing, not fat.
So where I'm going with this is exercise is very important to make sure you don't negatively impact your body composition by losing muscle weight when dieting.