I've been reading a lot about different servlets/application servers like Tomcat, WildFly, Jetty and GlassFish. However, I don't understand if they're only used for testing server-side code during development, or can you also use them for deploying the final production code to end users (commercially)?
My understanding was that once my app is ready for distribution, I then purchase a web server from some company (Google, AWS, RackSpace, etc.) and begin hosting my server-side code on their application servers. For instance, Google provides the Google App Engine which allows users to host web applications on their infrastructure.
Or can application server software be used even for distribution? I'm using WildFly right now but don't understand how I'd integrate it into a server that I purchased from Google for example. They also provide the Google Compute Engine which provides more flexibility. Is this where I could install my own (free, open source) app server instead? Or perhaps RackSpace for example would provide me with a server with Jetty pre-installed, or something like that?
Please clarify the intended scope of software like WildFly, or any advantages it has over using a provider's built-in app server. I'm eager to learn new concepts, so any reading is just a bonus!