It certainly sounds like a way to start. The full solution though is to end the wars in the countries where terrorism is born. And again, military action may not be the best way to end them.
Ultimately terrorist are typically people who are willing to die. People are only willing to die if they are mentally unstable or have been severely mistreated by society. A lot of Muslim terrorists are not mentally unstable, but do feel that they, or their society or countries have been seriously mistreated by whoever they terrorise. Other people not willing to sacrifice their lives, but rather hungry for power, then take advantage of them.