title: Unable to get connection, DataSource invalid - Netbeans, MySQL
body: <p>I'm following the tutorial of Netbeans site:</p>
  
  <p><a href="https://netbeans.org/kb/docs/web/mysql-webapp.html" rel="nofollow">https://netbeans.org/kb/docs/web/mysql-webapp.html</a></p>
  
  <p>everything was working fine until this step: Implementing JSTL code STEP 4 where the list should be displayed I get the following error: </p>
  
  <pre><code>javax.servlet.ServletException: javax.servlet.jsp.JspException: 
  Unable to get connection, DataSource invalid: "java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused."
  root cause
  
  javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException :
           Error connecting to server localhost on port 1527 with message Connection refused."
  </code></pre>
  
  <p>note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.0 logs.</p>
  
  <p>I suppose netbeans still tries to connect to the Derby DB. How can i change it to MySQL DB?
  I am using Java EE7, MySQL, Netbeans, Glassfish 4</p>