I have been asking myself the same question for many years, as I have looked at the history of the SS and tried to understand how it is that my grandfather became radicalized. Each of the factors currently offered as an explanation for jihadism - social exclusion, unemployment, the pull of an ideology offering a sense of belonging and environmental factors such as weak states and resentment left by previous wars - are hardly new as explanations for radicalization. I cannot help but think that if we spent more time reading our history books, we could spend more of our resources on solutions.
Without trying to sound like another expert with "the answer," I'd like to toss in a forgotten factor. My life experience is that shame and guilt are the two most destructive forces on the planet. These forces work in insidiuous ways to break down relations between human beings and turn them against one another. The shame and guilt of war in one generation easily passes to the next unless there is openness and discussion about the source of those emotions. It comes as no surprise that war generations prefer not to speak about what they know and feel. The problem is they leave the next generations in a no-man's land where guilt and shame easily light the flames of anger leading to hatred. Someone has to be blamed for "my" shame.
We often wonder how it is possible that young men and women raised in a peaceful Europe can decide to take up the weapons of war and terror. Their families are mostly described as peaceloving and unsuspecting persons. I am sure that at the very least they do not wish for their children to sacrifice themselves to war. What we haven't given much attention to is the dynamics of family, still the most basic unit forming us as human beings. The parents of the young jihadists are frequently themselves refugees from violence. They have seen things they do not wish to discuss and may fabricate the truth. While this is understandable, we might wish to consider what effect this has on their children. Silence and untruths (albeit often well-intentioned), whether in victim or perpetrator families, are the nursemaids of anger and eventually hatred. Combine these with unemployment, exclusion, etc. and you have a lethal mix.
There is no single answer to the question of how to stop hatred, but as the granddaughter of someone who today would be regarded as a terrorist, my suggestion is that at the bare minimum we do everything we can to encourage openness within the families of new migrants so that in a few short years their young do not become filled with a hopeless and unstoppable anger. The dynamics of communication and non-communication in families is a worthy focus in preventing an expansion of terror and fear in our world.