Home > Back-end > Java calls connection mysql connection class can't call
Java calls connection mysql connection class can't call
Time:09-25
I wrote a class to connect to MySQL, then it also wrote some members of a static method, the method of connection I packed into a static method is called, but can't use this class in the servlet implementation method statement object and calls his static members, I don't know why, because when I was in the test, run separate connection of a class method is ok, but the servlet invokes the object's static method will be an error, with try catch wrapped up an error, solving, just turn off the computer, the code can't wear,