mysql - I'm getting java.lang.ExceptionInInitializerError when I connect to JDBC -


i'm running server using tomcat 7.0 in eclipse. have html file link servlet file, has form input value. when input value in html file, forwards servlet file, , servlet file has codes connect jdbc. code quite simple.

data = request.getprameter("name"); connection conn = drivermanager.getconnection(url, username, password); 

i've imported used. also, in tomcat server, added permission in catalina.policy

grant{     permission java.net.socketpermission "*:1-65535", "connect,resolve"; }; 

i'm not sure why i'm getting error. i'm happy give more information if needed! please me :)

i had detailmessage saying access denied ("java.util.propertypermission" "file.encoding" "read"). added permission java.util.propertypermission "file.encoding", "read"; , fixed it'd great if helps who's in trouble


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -