I was not able to create glassfish-resources.xml and JDBC data source and connection pool in NetBeans 8.1.
I followed the instructions from this page https://netbeans.org/kb/docs/web/mysql-webapp.html (section "Setting up a JDBC data source and connection pool"), but was not able to get those objects created.