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/

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>