title: Connect to SQL Server database using jsp?
body: <p>Here is some code inside my jsp:</p>
  
  <pre><code>try {
      String connectionURL = "jdbc:sqlserver://10.103.18.174:3304;databaseName=DWH_ILEM";
  
      Connection connection = null;
  
      Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
  
      connection = DriverManager.getConnection(connectionURL, "dwh_reader", "ilem@2017");
  
      if(!connection.isClosed()) {
          out.println("Successfully connected");
          connection.close();
      }
      catch(Exception ex) {
          out.println("Unable");
      }
  }
  </code></pre>
  
  <p>And here is the structure of my project:</p>
  
  <p><a href="https://imgur.com/a/jw7qi" rel="nofollow noreferrer">https://imgur.com/a/jw7qi</a></p>
  
  <p>I can connect to the database via SSMS but not with jdbc, I can't detect what is wrong.</p>
  
  <p>Thanks in advance.</p>