wood burning stoves 2.0*
The moose likes Sockets and Internet Protocols and the fly likes Applet with a ServerSocket Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Applet with a ServerSocket" Watch "Applet with a ServerSocket" New topic

Applet with a ServerSocket

Marco Tulio Borges
Ranch Hand

Joined: Sep 14, 2004
Posts: 45
Hi, there, Ranch friends! I have a web application running under j2sdk1.4.2_07 and jakarta-tomcat-5.0.28 and this application has an applet. This little fellow opens a ServerSocket. At some point, a class at the server tries to open a connection with this applet with a Socket. Here I got a problem:
Written in the Java Plug-in console:
java.security.AccessControlException: access denied (java.net.SocketPermission accept,resolve)

at java.security.AccessControlContext.checkPermission(Unknown Source)

at java.security.AccessController.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkAccept(Unknown Source)

at java.net.ServerSocket.implAccept(Unknown Source)

at java.net.ServerSocket.accept(Unknown Source)

at my.package.MyApplet.someMethod(MyApplet.java:someLineNumer)

.... lots of other stuff ....

Well... What should I do? Should I add some permission file somewhere? Where? How? Please help me, country folks!

.: SCJP 1.4 (95%) / SCWCD 1.4 (91%) / SCBCD (77%) :.
"Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us." - Calvin
Tom Katz
Ranch Hand

Joined: Aug 19, 2002
Posts: 169
Is the applet signed?
Marco Tulio Borges
Ranch Hand

Joined: Sep 14, 2004
Posts: 45
Yes, it is.
Marco Tulio Borges
Ranch Hand

Joined: Sep 14, 2004
Posts: 45
Ops! It wasn't! My bad... Sorry... It's ok, now...
It is sorta covered in the JavaRanch Style Guide.
subject: Applet with a ServerSocket
Similar Threads
How to put JDBC driver in applet jar?
Problem loading applet from servlet - load: xxx.class not found
Accesing an EJB code in applet using JBOSS
JBOSS - need help with my first ejb deployment and testing
applet problem