Here stmt = con.createStatement(); the con object is having the value null, you can check this by debugging your application. At run time it happens something like this null.createStatement() which is false. I can help if you attached all the Files related to it (LoginDAO.java , LoginAction.java).
String connectionURL = "jdbc:postgresql://localhost:5432/cities";
// Change the connection string according to your db, ip, username and password
String username="postgres";
String password="admin@123";
Class.forName("org.postgresql.Driver");
// If you are using any other database then load the right driver here.
//Create the connection using the static getConnection method
con = DriverManager.getConnection (connectionURL,username,password);
add this lines before
con.createStatement();