문제

I got exception java.security.AccessControlException: access denied (java.net.SocketPermission www.somepage.net:80 connect,resolve) when I try

doc = Jsoup.connect("http://www.somepage.net/").get();

in web app in Tomcat 6. However if I do this in mvn test outside of tomcat 6 or in another web app in tc server all is going great.

도움이 되었습니까?

해결책

You need to edit the /conf/catalina.policy file to grant java.net.SocketPermission on the code in question.

See also Tomcat 6.0 Security Manager HOW-TO.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top