My problem is that I have to set a variable in a try statement otherwise I get a compile error.
Later on I need to use that variable but it is now out of scope, or s
Thanks everyone for your help. First you helped me identify that there had to be some kind of exception being thrown. When I looked at the Tomcat console I could see it was a class not fund error for the MySQL connector. I had included that in my project, but not within the project itself - I just lazily referred to it in my lib directory, so ultimately the exception caused the problem, but using your suggestions such as if(rs != null) helped me get to the root cause.
Initially I thought it had something to do with the variable being out of scope. Clearly that was not it.