> > > '127.0.0.1' with origin from 'local-classpath-classes'.
Frequent question/answer again....
When getting classes used by an applet, Netscape (and IE and appletviewer)
classloader look first for those classes in the local environement
variable CLASSPATH : if it finds them, the classloader use those
classes rather than the ones which are packaged with the applet.
Because those classes arenot dowloaded from the server,
opening connections from those classes to the server are forbidden
by the JVM sandbox : browser JVM sandbox only allow connections
to the host where classes were downloaded. There's an exception :
if the applet and the server are running on the same machine and
the classes wich are making connections are found in the CLASSPATH
then IE and appletviewer are clever enough to see that connections
are from the machine to itself, BUT NOT NETSCAPE !
So if you have an applet which use classes that are present in the
CLASSPATH and that those classes are making connections to a server
running on the same machine it won't be allowed by Netscape.
Solution : delete the path to thoses classes from the CLASSPATH.
In general DON'T USE CLASSPATH environment variable. If one of
your application need a classpath there's always a mean to specify
this CLASSPATH specifically for this application (generally by
setting it in a parameter in the command line or in a administration
user interface)
HTH
(Sorry for my English)
JM
-----Original Message-----
From: shishirk [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 30, 2000 12:14 PM
To: [EMAIL PROTECTED]
Subject: Re: Applet to servlet Security Exception
well its b'cos the security manager of the JVM which netscape is using is
not allowing the applet to open a raw socket connection on it try using some
other way of communicating betwen applet and servlet either by RMI .
***************************************************
Change is Inevident everywhere
It stops u from Ageing
***************************************************
----- Original Message -----
From: "kavitha ramasamy" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 30, 2000 1:30 AM
Subject: Re: Applet to servlet Security Exception
> Now It is woking fine in IE but not in Netscape. It is giving Netscape
> Security Exception.
>
> Is anybody know the reason.
> Thanks,
> Kavitha
>
> >From: Zhen Ni <[EMAIL PROTECTED]>
> >Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> > Servlet API Technology." <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Re: Applet to servlet Security Exception
> >Date: Wed, 29 Mar 2000 12:05:33 -0500
> >
> >Yeah, I'm experiencing the same problem when trying to establish a
> >connection to a remote database. Does anyone know why this happens? My
> >applet is unsigned and it should catch any connection problems in the
java
> >code itself.
> >
> >-Tom
> >
> >
> >
> >
> >On Wed, 29 Mar 2000, kavitha ramasamy wrote:
> >
> > > Hello,
> > >
> > > I am calling a servlet from my applet. It is working fine in
> > > appletviewer. But when I do the same in browser i am getting security
> > > Exception as
> > >
> > > netscape.security.AppletSecurityException: security.Couldn't connect
to
> > > '127.0.0.1' with origin from 'local-classpath-classes'.
> > >
> > > at java.lang.Throwable.<init>(Compiled Code)
> > >
> > > at java.lang.Exception.<init>(Compiled Code)
> > >
> > > at java.lang.RuntimeException.<init>(Compiled Code)
> > >
> > > at java.lang.SecurityException.<init>(Compiled Code)
> > >
> > > at netscape.security.AppletSecurityException.<init>(Compiled Code)
> > >
> > > at netscape.security.AppletSecurityException.<init>(Compiled Code)
> > >
> > > at netscape.security.AppletSecurity.checkConnect(Compiled Code)
> > >
> > > at java.lang.SecurityManager.checkConnect(Compiled Code)
> > >
> > > at java.net.Socket.<init>(Compiled Code)
> > >
> > > * at java.net.Socket.<init>(Compiled Code)
> > >
> > > at CHttpPost.doSocketPost(Compiled Code)
> > >
> > > at Applet1.btnPost_MouseClicked(Compiled Code)
> > >
> > > at Applet1$SymMouse.mouseClicked(Compiled Code)
> > >
> > > at java.awt.Component.processMouseEvent(Compiled Code)
> > >
> > > at java.awt.Component.processEvent(Compiled Code)
> > >
> > > at java.awt.Button.processEvent(Compiled Code)
> > >
> > > at java.awt.Component.dispatchEventImpl(Compiled Code)
> > >
> > > at java.awt.Component.dispatchEvent(Compiled Code)
> > >
> > > at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled
> >Code)
> > >
> > > at java.awt.EventDispatchThread.run(Compiled Code)
> > >
> > > at
> > >
> >netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled
> > > Code).
> > >
> > > How to overcome this?
> > > Thanks,
> > > Kavitha
> > >
> > >
> > > ______________________________________________________
> > > Get Your Private, Free Email at http://www.hotmail.com
> > >
> > >
>
>___________________________________________________________________________
> > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> >body
> > > of the message "signoff SERVLET-INTEREST".
> > >
> > > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > > Resources:
http://java.sun.com/products/servlet/external-resources.html
> > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> > >
> >
>
>___________________________________________________________________________
> >To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> >of the message "signoff SERVLET-INTEREST".
> >
> >Archives: http://archives.java.sun.com/archives/servlet-interest.html
> >Resources: http://java.sun.com/products/servlet/external-resources.html
> >LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html