The disciples who had seen Jesus believed, but Thomas hadn't been there the day Jesus had shown up. "I need to see for myself. I've got to put my finger on the spot where the nails were," he told them.
A week later, Jesus appeared to Thomas. "Touch me. Do not doubt but believe."
Thomas believed. Read the passage carefully. We are not told that Thomas, despite what he had thought earlier, had to touch Jesus in order to believe.
Keep reading. Look at verse 31. John's gospel is written so that we can believe. Thomas and the other first generation Christians saw Jesus and believed. They knew the presence of God through the seeing of Jesus. We later Christians are able to know the presence of God through their witness. And--through our witness, other Christians will come to believe.