JSP页面上的JUpload问题

发布于 2024-10-15 09:44:08 字数 1657 浏览 1 评论 0原文

我得到:

load: class wjhk.jupload2/JUploadApplet.class not found.
java.lang.ClassNotFoundException: wjhk.jupload2.JUploadApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://test1/EAMAPP84/data/docuploads/ROADS/NoamTest/wjhk/jupload2/JUploadApplet/class.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 9 more
Exception: java.lang.ClassNotFoundException: wjhk.jupload2.JUploadApplet.class

在java consule上。

调用小程序

<applet
code="wjhk.jupload2/JUploadApplet.class"
codebase="\EAMAPP84\data\docuploads\ROADS\NoamTest"
archive="JUpload.jar"
width="650"
height="400">
<param name="actionURL"
value="\\test1\EAMAPP84\data\docuploads\ROADS\NoamTest">
</applet>

当 jar 位于给定目录中时, 。 奇怪的是,当我使用它创建一个简单的 html 文件时,它可以工作,但是当我在 jsp 页面中使用它时,我收到此错误。

有人吗?

Im getting:

load: class wjhk.jupload2/JUploadApplet.class not found.
java.lang.ClassNotFoundException: wjhk.jupload2.JUploadApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed:http://test1/EAMAPP84/data/docuploads/ROADS/NoamTest/wjhk/jupload2/JUploadApplet/class.class
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 9 more
Exception: java.lang.ClassNotFoundException: wjhk.jupload2.JUploadApplet.class

on the java consule.

the applet is called:

<applet
code="wjhk.jupload2/JUploadApplet.class"
codebase="\EAMAPP84\data\docuploads\ROADS\NoamTest"
archive="JUpload.jar"
width="650"
height="400">
<param name="actionURL"
value="\\test1\EAMAPP84\data\docuploads\ROADS\NoamTest">
</applet>

while the jar is sitting in the given directory.
the wierd thing is, when i create a simple html file using this it works, butwhen using it in my jsp page i get this error.

anyone?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

嘦怹 2024-10-22 09:44:08

code 属性应指向 类的完全限定名称(与普通 Java 类的 import 语句中使用的名称相同)。

code="wjhk.jupload2.JUploadApplet"

顺便说一下,例外情况还暗示:

java.lang.ClassNotFoundException: wjhk.jupload2.JUploadApplet.class

.class部分根本不属于那里)

以及这里:

java.io.IOException: open HTTP connection failed:http://test1/EAMAPP84
/data/docuploads/ROADS/NoamTest/wjhk/jupload2/JUploadApplet/class.class

(注意/class.class 部分显然是错误的)

The code attribute should point to the fully qualified name of the class (the same as you would use in import statement of a normal Java class).

code="wjhk.jupload2.JUploadApplet"

The exception is by the way also hinting that:

java.lang.ClassNotFoundException: wjhk.jupload2.JUploadApplet.class

(the .class part doesn't belong there at all)

and also here:

java.io.IOException: open HTTP connection failed:http://test1/EAMAPP84
/data/docuploads/ROADS/NoamTest/wjhk/jupload2/JUploadApplet/class.class

(note the /class.class part which is obviously wrong)

南风起 2024-10-22 09:44:08
code="wjhk.jupload2/JUploadApplet.class"

应该是..

code="wjhk.jupload2.JUploadApplet"
code="wjhk.jupload2/JUploadApplet.class"

Should probably be..

code="wjhk.jupload2.JUploadApplet"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文