Error:

K

Karan Mehta

Hi All,
I have an applet embedded in a HTML file being displayed in IE or any
net Browser. The applet lets me view some images that are coming from
some place on hard disk,and are passed as parameter to the applet. The
problem is that i encounter and error {Exception: access denied
(java.net.SocketPermission hglpc024 resolve)}
.. Here is the HTML file i try to see in the explorer as
http://localhost:8080/<the path where file is located>


<HTML>
<HEAD>
<TITLE>
DICOM Viewer
</TITLE>
</HEAD>
<BODY>
<APPLET
CODEBASE = "."
CODE = "dicomviewer.Viewer.class"
NAME = "Viewer.java"
WIDTH = 100%
HEIGHT = 100%
HSPACE = 0
VSPACE = 0
ALIGN = middle >
<PARAM NAME = "dicURL" VALUE =
"http://hglpc024/DICOM/jsp/dicomviewer/Dicom.dic">
<PARAM NAME = "imgURL0" VALUE =
"http://hglpc024/DICOM/jsp/data/sample.dcm">
</APPLET>
</BODY>
</HTML>
 
A

Andrew Thompson

I have an applet embedded in a HTML file being displayed in IE or any
net Browser. The applet lets me view some images that are coming from
some place on hard disk,and are passed as parameter to the applet.

So this is a page on you local disk?
..The
problem is that i encounter and error {Exception: access denied
(java.net.SocketPermission hglpc024 resolve)}

Does that host exist?
Here is the HTML file i try to see in the explorer as
http://localhost:8080/<the path where file is located>
....
<APPLET
CODEBASE = "."
CODE = "dicomviewer.Viewer.class"
NAME = "Viewer.java"

'name' is only relavent to the applet context
and java sscript, and allows you to reference
applets by name. 'viewer' would make more sense
than 'Viewer.java'
WIDTH = 100%

You can have
WIDTH=100 <!-- 100px -->
WITDH="100%" said:
HEIGHT = 100%
ditto

HSPACE = 0
VSPACE = 0
ALIGN = middle >
<PARAM NAME = "dicURL" VALUE =
"http://hglpc024/DICOM/jsp/dicomviewer/Dicom.dic">

There is no such internet address
as http://hglpc024/, try typing it in
you browser address bar. Where did you
get that from?
<PARAM NAME = "imgURL0" VALUE =
"http://hglpc024/DICOM/jsp/data/sample.dcm">
ditto

</APPLET>
</BODY>
</HTML>

HTH
 
Z

zoopy

Hi All,
I have an applet embedded in a HTML file being displayed in IE or any
net Browser. The applet lets me view some images that are coming from
some place on hard disk,and are passed as parameter to the applet. The
problem is that i encounter and error {Exception: access denied
(java.net.SocketPermission hglpc024 resolve)}
.. Here is the HTML file i try to see in the explorer as
http://localhost:8080/<the path where file is located>


<HTML>
<HEAD>
<TITLE>
DICOM Viewer
</TITLE>
</HEAD>
<BODY>
<APPLET
CODEBASE = "."
CODE = "dicomviewer.Viewer.class"
NAME = "Viewer.java"
WIDTH = 100%
HEIGHT = 100%
HSPACE = 0
VSPACE = 0
ALIGN = middle >
<PARAM NAME = "dicURL" VALUE =
"http://hglpc024/DICOM/jsp/dicomviewer/Dicom.dic">
<PARAM NAME = "imgURL0" VALUE =
"http://hglpc024/DICOM/jsp/data/sample.dcm">
</APPLET>
</BODY>
</HTML>

Java's security system allows an applet only to connect to the host from which the applet
originated. Apparently your applet runs from 'localhost' and wants to create a HTTP connection to
'hglpc024': Java kicks in and throws the security exception.

Either sign your applet, see <http://mindprod.com/jgloss/signedapplets.html>,
or, using policytool <http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/policytool.html>, assign
SocketPermission "hglpc024:80" "accept, connect, listen, resolve" to your applet.

HTH,
Z.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top