Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Java applets and access to other "clients"!

Reply
Thread Tools

Java applets and access to other "clients"!

 
 
Rune Andresen
Guest
Posts: n/a
 
      08-24-2003
Hi, I hope someone here can help me

I wish to make a java-applet that can communicate with another client which
have downloaded the same applet. The java security in default makes this
impossible, the applets can only send data to the server they where
downloaded from. I have heard that the applets have more access if they are
downloaded from a https, or the applet can ask the computer to get more
access, but I have not suceeded to do this.

Regards
Rune J.A




 
Reply With Quote
 
 
 
 
Matt Humphrey
Guest
Posts: n/a
 
      08-24-2003

"Rune Andresen" <(E-Mail Removed)> wrote in message
news:biark6$80t$(E-Mail Removed)...
> Hi, I hope someone here can help me
>
> I wish to make a java-applet that can communicate with another client

which
> have downloaded the same applet. The java security in default makes this
> impossible, the applets can only send data to the server they where
> downloaded from. I have heard that the applets have more access if they

are
> downloaded from a https, or the applet can ask the computer to get more
> access, but I have not suceeded to do this.
>


An applet requires a special permission to be able to open a connection to a
machine other than the one it came from. Either the user grants this
privilege directly in the JVM security properties or the applet (signed)
requests it and the user then grants it. Applet security has nothing to do
with https.

Two typical problems with the kind of client-to-client communication you're
attempting are finding out the real IP of the other client and accomodating
the firewall. An easy solution (when it is possible) is to allow the
server from which the applet comes to proxy the communication. The server
keeps the client informed of available peers and forwards messages from one
peer to another. Clients all connect to the server with outgoing channels so
firewalls are not issue. And since the communication is with the original
server there's no security problem. You don't even have to craft a custom
protocol as you can use HTTP with servlets. Whether you use this structure
depends on whether you can run an application on your server and what kind
of performance and scalability you hope to achieve.

Cheers,
Matt Humphrey http://www.velocityreviews.com/forums/(E-Mail Removed) http://www.iviz.com/


 
Reply With Quote
 
 
 
 
Rune Andresen
Guest
Posts: n/a
 
      08-24-2003
Hi, thank you very much

I have heard about your first suggestion about asking the client about
permission. Do you know how to implement this; where in the Java API this
exists?

I whish to achieve a high performance connection for a real-time
communication. With which implementation on the server side would you
prefere in this case? Is tomcat enough or is a apache server solution better
(to achieve a faster connection)

Thank you for this knowledge !

Regards
Rune Andresen

"Matt Humphrey" <(E-Mail Removed)> skrev i melding
news:ew82b.6972$(E-Mail Removed) ...
>
> "Rune Andresen" <(E-Mail Removed)> wrote in message
> news:biark6$80t$(E-Mail Removed)...
> > Hi, I hope someone here can help me
> >
> > I wish to make a java-applet that can communicate with another client

> which
> > have downloaded the same applet. The java security in default makes this
> > impossible, the applets can only send data to the server they where
> > downloaded from. I have heard that the applets have more access if they

> are
> > downloaded from a https, or the applet can ask the computer to get more
> > access, but I have not suceeded to do this.
> >

>
> An applet requires a special permission to be able to open a connection to

a
> machine other than the one it came from. Either the user grants this
> privilege directly in the JVM security properties or the applet (signed)
> requests it and the user then grants it. Applet security has nothing to

do
> with https.
>
> Two typical problems with the kind of client-to-client communication

you're
> attempting are finding out the real IP of the other client and

accomodating
> the firewall. An easy solution (when it is possible) is to allow the
> server from which the applet comes to proxy the communication. The server
> keeps the client informed of available peers and forwards messages from

one
> peer to another. Clients all connect to the server with outgoing channels

so
> firewalls are not issue. And since the communication is with the original
> server there's no security problem. You don't even have to craft a custom
> protocol as you can use HTTP with servlets. Whether you use this

structure
> depends on whether you can run an application on your server and what kind
> of performance and scalability you hope to achieve.
>
> Cheers,
> Matt Humphrey (E-Mail Removed) http://www.iviz.com/
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
best way to create applets usable on other sites musosdev ASP .Net 4 01-12-2008 01:19 PM
Java Applets connecting to Databases: access denied (java.net.SocketPermission ... resolve) carrilho.paulo@gmail.com Java 2 10-14-2007 09:04 PM
.Net applets and their ability to access local resources genc ymeri ASP .Net Web Controls 0 05-17-2007 03:33 PM
using generated java code in Java applets juraj Java 1 03-02-2007 04:41 PM
Getting Two Java Applets to Communicate with Each Other kvnsmnsn@hotmail.com Java 7 09-04-2005 09:32 PM



Advertisments