Alright I solved it.. the problem wasn't in deploying to the server. The problem was in starting the server.
Even though the WildFly server did start up, it still showed errors on starting up. I should have investigated those errors better. I discovered the file mysql-connector-java-5.1.23-bin.jar was missing from my "wildfly --> standalone --> deployments" folder. The problem is solved by adding this jar-file to that folder. I don't know how the jar-file managed to disappear.
Anyway, I can deploy my Web application again. Problem solved.