my guess on the invalid character would be the ';'
Try removing that and see if it works.
Having said that though, running sql queries through a JSP is not the best approach.
Using JSTL is better than using scriptlets, I'll grant you that, but even in the JSTL specification they state that these tags should only be used from demos and small projects.
You would be better off writing a data access layer in java.