I don't have anything else to really say on that, you'll need to fully understand java in order to fully understand JSP, but that doesn't mean you need to fully understand either really (I don't and Java is one of my primary languages).
I'd say... Basics, Arrays, [built-in]Collections, Generics, I/O, and I think that should about do it. That should at least give you a good start at JSP. In the long run, you'll be wanting to cover that whole book, Applets and RMI are very handy to know.
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php