This really depends on what you want the car for. Fun, reliability, or whatever.
Reliability, I would go with the Mazda.
Fun, well it really depends on what you like to do. Both have sporty options. And both are probably fun to drive. Mazdas have really good handling.
However, the Jetta will probably be built better. Stronger material, more luxurious interior, etc.
I could go on, but I think you might see my point. You could go with either. Do you research.
If you have extra money in case anything goes wrong with the car, go with the Jetta. If money is tight, go with the Mazda.