Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Applets and the fly likes Testing a chat applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Testing a chat applet" Watch "Testing a chat applet" New topic
Author

Testing a chat applet

mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 243

Hi, i want to test my chat applet, if i run my chat server and run the chat applet from applet viewer it is working fine(localhost chat server and client are in same syatem). if i deploy my chat applet in tomcat server and run then this is showing some security error like.


the thread code is

192.168.0.106:54555 is local ip and port number where Chat server is running
Andrew Thompson
Ranch Hand

Joined: Aug 05, 2010
Posts: 77
    
    5
mallikarjun dontamsetti wrote:
192.168.0.106:54555 is local ip and port number where Chat server is running


A sand-boxed applet can 'phone home' to the server it came from, but it seems this JVM is confused that it is coming from the same server. What is the copy/pasted URL from the browser address bar when the applet fails?


Andrew Thompson
http://pscode.org/
mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 243

http://localhost:8084/SwingBrowser1/UserServlet?action=login
Andrew Thompson
Ranch Hand

Joined: Aug 05, 2010
Posts: 77
    
    5
Huh. That URL destroys my theory. I expected it to be a File based URI. If I think of anything else, I'll get back to you.
mallikarjun dontamsetti
Ranch Hand

Joined: Mar 18, 2011
Posts: 243

I dug my code and found something.
Server starts on a system which has Ip adress example 210.123.1.xxx on a port. Client has to connect to this TCP but the it is not (this may be due to applet can communicate to host only). The applet is connecting to Tomcat IP.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Testing a chat applet
 
Similar Threads
java.security.AccessControlException: access denied (java.net.SocketPermission ftp.powweb.com
Trouble with an Applet Exception.
Head First Java book, chapter 15 - help needed with running the chat terminals
Applets + JDBC + MySQL = access denied
RMI, access denied