Hi, thanks for your help in advance. However i think i've discovered my
problem. But i don't hava a solution. Maybe you can help me... My html file
code is the following:
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="800" height="600" align="baseline"
codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Vers
ion=1,3,0,0">
<PARAM NAME="code" VALUE="sged.presentation.Sprint_Aplicacao_Applet">
<PARAM NAME="codebase"
VALUE="file://Phc/C/leas/myProjects/Sprint2/output/store/web/expand/Sprint2/
WEB-INF/classes">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
<PARAM NAME="scriptable" VALUE="true">
No JDK 1.2 support for APPLET!!
</OBJECT>
The problem is, that the code base of the applet is
file://Phc/as_the_code_above .So you try to connect to a servlet as
http://phc:8000/servlet it's obviuos different from the location where the
applet was downloaded from... so it gives me an
java.security.AcessControlException.
I'm using an application server, and i dont't know to make my applet class
available so that i can call it through http://phc:8000/something so that
the codebase of the applet can be http://phc:8000 and then (i think) i will
have no problem to make UrlConnections from another computer because the
applet will not "get out from her sandbox"
the only thing i can acess through http://phc:8000 is the servlet's which
are mapped in the web.xml Do you have any ideia?? Have you ever made
applet to servlet? The servlet.class and applet.class are in the same
directory /WEB-INF/classes/sged/presentation
Thanks for your help....
-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Marco
Trevisan
Sent: quinta-feira, 27 de Setembro de 2001 12:25
To: [EMAIL PROTECTED]
Subject: Re: java.net.ConnectException in applet connection to servlet
Adding some more data to evaluate when including applets in the architecture
of a web application (copy the entire url):
http://groups.google.com/groups?hl=it
&frame=right&th=7c0d229cf3ad154f&seekm=
%23TNqHVXNBHA.3036%40tkmsftngp02#link1
Marco
----- Original Message -----
From: "Hugo Malheiro" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, September 25, 2001 11:54 AM
Subject: Re: java.net.ConnectException in applet connection to servlet
> But i think that it is weird that the applet works fine in localhost and
it
> only gives this error when running from another machine?It really works
fine
> in localhost...??? I say again that i'm not using javascript...
>
> Well, but i gonna try using threads as explained in
> http://www.kfki.hu/~cspeter/jvm-bugs/ns6jsace.html
>
> Thanks....
> Hugo Malheiro
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Mike
> Marchywka
> Sent: segunda-feira, 24 de Setembro de 2001 23:08
> To: [EMAIL PROTECTED]
> Subject: Re: java.net.ConnectException in applet connection to servlet
>
>
> Yes. It looks like it is suggesting using a different thread to make
> a connection. I've become rather superstitious about this but
> I think it is a good idea. If you are writing code that can be called
> from anything- IE 5.0, NS6, or a test application- you don't really know
> when you are inviting deadlock or freezing a UI. I think you get better
> modularity by doing anything critical with a thread you have complete
> knowledge
> of rather than hoping you don't get deadlock in some situations. I did
> have one
> case of an applet locking up ( sporadic, never fully tracked down) by
> putting in (what I thought) was a safe synchronized block in a method
> called
> by JavaScript. Obviously, this depends on what you are trying to do- if
> the
> caller needs to block, then it needs to block.
>
> I was hoping someone else could qualify my statements...
>
> I hereby state that, to the best of my knowledge and belief,
> the foregoing statements are, or could potentially be, relevant to
> Servlets.
>
> Thanks.
>
> -----Original Message-----
> From: Hugo Malheiro [mailto:[EMAIL PROTECTED]]
> Sent: 2001,September.24.Monday 11:08 AM
> To: [EMAIL PROTECTED]
> Subject: Re: java.net.ConnectException in applet connection to servlet
>
>
> When you say "workaround" do mean using something like described in
> http://www.kfki.hu/~cspeter/jvm-bugs/ns6jsace.html . Can you explain me
> what
> this prevents? advantages?
>
>
>
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Mike
> Marchywka
> Sent: segunda-feira, 24 de Setembro de 2001 14:15
> To: [EMAIL PROTECTED]
> Subject: Re: java.net.ConnectException in applet connection to servlet
>
>
> In general, I don't think it is good practice to do anything from
> a JavaScript or event thread except set a flag. Any comments?
> You simply don't have a lot of control over these unknown threads
> or what they are doing or locking. It is probably not very safe to
> have them do anything that could block or take a while to execute.
> Even if you didn't have this problem, you may want to use a workaround
> anyway...
>
> Political Justification:
> I think this is servlet related since a lot of servlets do communicate
> with applets and there may be issues here that impact servlet design.
>
> -----Original Message-----
> From: Hugo Malheiro [mailto:[EMAIL PROTECTED]]
> Sent: 2001,September.24.Monday 9:01 AM
> To: [EMAIL PROTECTED]
> Subject: Re: java.net.ConnectException in applet connection to servlet
>
>
> This problem you describe can also occurs in Internet Explorer? In
> localhost
> i'm using IE 5 and in the other machine i'm using IE6?
>
> May this be the problem? Have you experience this problem in IE? And i'm
> not
> calling the applet from javascript....
>
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Marco
> Trevisan
> Sent: segunda-feira, 24 de Setembro de 2001 13:31
> To: [EMAIL PROTECTED]
> Subject: Re: java.net.ConnectException in applet connection to servlet
>
>
> >From previous posts I haven't determined if you're using the same
> browser on the two machines.
> In case you're using N6 (I've used only 6.1 preview), you may have
> encountered a problem described in
> http://www.kfki.hu/~cspeter/jvm-bugs/ns6jsace.html
>
> Notice that this new security feature applies only if you call applet's
> methods from JavaScript, maybe even user interaction like
> pressing a button on an applet shows this behaviour ...
>
> Marco
>
> ----- Original Message -----
> From: "Hugo Malheiro"
>
> >
> > This only occurs when i run my application from another machine, in
> > localhost it communicates perfectly
> >
> >
>
> ________________________________________________________________________
> ___
> 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
>
> ________________________________________________________________________
> ___
> 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
>
>
___________________________________________________________________________
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