I've only ever lost weight by doing both (not because I couldn't doing just one, but because when I can be bothered to monitor calories, I go all-out to make it as quick a process as possible), but it's VERY simple to do this. That being said, simple doesn't mean easy.
Find LOW CALORIE diets. Don't bother with any of the gimmicky diets (atkins, south beach, paleo, etc., etc.), just find a number of low calorie diets that provide you with what you need. Focus on MOSTLY eating vegetables, but making sure you're getting lean protein (fish is especially good) and enough carbs (without carbs, you'll tend to feel sluggish as they are quick energy for the body). Use meal replacement shakes if you're up to it, as they're a good way to jam in food without thinking, but some people feel hungry afterwards, so it's hit and miss. The point of calorie restriction is you choose a number and stick to it, no matter what. Try to break up your meals into roughly equivalent sizes so you don't crap out partway through the day.
Honestly, though, talk to your doctor about that hernia. A lot of the time, lack of exercise is what causes them. See what kinds of exercise won't hurt you and do that, low impact, etc. at first, and build up. Go for a walk, get in a pool, so some pushups and pullups and leg presses (should all be kind to your back), etc. TALK TO YOUR DOCTOR FIRST, but you should be able to find a way to integrate exercise into it.
Finally: make sure you give yourself a cheat. I like to do 2 cheat meals a week. That means that of all of your meals (breakfast, lunch and dinner), are all on the crappy, painful diet, but every once in a while, a breakfast, lunch or dinner is full of fat and calories. You'll find yourself looking forward to these days A LOT, but what happens is that when you are tempted to cheat, instead of the future looking like a hopeless, endless succession of the same, you go, well, I AM going out for steak in two days, so I might as well stick with it. It works wonders.
Good luck! Diets are the absolute worst, and hopefully I'll never have to do one ever again.