JSP mysql tomcat5.5 debian: forbidden by default
If you are getting this error while trying to connect to mysql from JSP in debian:
java.net.SocketPermission 127.0.0.1:3306 connect,resolve
Then you should allow the connection in tomcat policy, add this line:
“java.net.SocketPermission 127.0.0.1:3306 connect,resolve” to the “grant{” block in the file “/etc/tomcat5.5/policy.d/04webapps.policy”
source: http://www.linuxquestions.org/questions/programming-9/jspjava-mysql-connection-fails-218903/