Applet 在 weblogic 11 中找不到类
我有一个小程序和一些 jar 文件中的库。显然,当我将所有必需的类添加到 IDE (JDeveloper) 中的库路径时,所有必需的类都通过我的小程序进行了部署。但它无法访问这些类。小程序只是冻结了,没有任何错误。也许是安全权限造成的?这是部署存档中的结构(war)
WEB-INF
classes
my
other_packages
lib
jar libs are here
applet.html
my
package of classes, don't know why it is duplicated
这是 HTML 文件:
<APPLET CODE="my.base.Applet1"
HEIGHT="200" WIDTH="200" MAYSCRIPT ALIGN="bottom">This browser does not support Applets.
</APPLET>
我尝试添加 jar 库,并且仅当我使用小程序从本地磁盘打开 html 文件时它才有效。我必须将库的路径指定为 ARCHIVE="WEB-INF/lib/commons-logging.jar"。如果我只使用官方教程中的“commons-logging.jar”,则会导致“找不到类”错误。 因此,当部署在服务器上并通过 http 访问时,即使使用 ARCHIVE="WEB-INF/lib/commons-logging.jar" 也找不到这些 jar 文件。
我使用 JDeveloper 并将 html、applet 和库作为 war 文件部署到 Weblogic 11。
我还尝试了 CODEBASE 属性,其中 CODEBASE="/bea_wls_internal/classes/" 以及指定的附加“appName@componentName” 代码库 =“/bea_wls_internal/classes/appName@componentName”。也许我错误地使用了“appName@componentName”,但只有几个不清楚的示例如何使用它。
任何帮助将不胜感激。
I have an applet and a few libraries in jar files. Obviously, all required classes are deployed with my applet as I added them to library path in my IDE (JDeveloper). But it can't access these classes. The applet just freeze ups without any errors. Maybe it caused by security permissions ? Here is a structure in deployment archive (war)
WEB-INF
classes
my
other_packages
lib
jar libs are here
applet.html
my
package of classes, don't know why it is duplicated
Here is HTML file:
<APPLET CODE="my.base.Applet1"
HEIGHT="200" WIDTH="200" MAYSCRIPT ALIGN="bottom">This browser does not support Applets.
</APPLET>
I tried to add jar libraries and it works only if I open html file with applet from local disk. I have to specify path to libraries as ARCHIVE="WEB-INF/lib/commons-logging.jar". If I use just "commons-logging.jar" as it was in official tutorials it causes "Class not found" error.
So it can't find these jar files even with ARCHIVE="WEB-INF/lib/commons-logging.jar" when deployed on server and accessed through http.
I use JDeveloper and deploy html, applet and libraries as a war file to Weblogic 11.
I also tried CODEBASE attribute both with CODEBASE="/bea_wls_internal/classes/" and with additional "appName@componentName" specified
CODEBASE="/bea_wls_internal/classes/appName@componentName". Maybe I use "appName@componentName" wrong but there are only few not clear examples how to use it.
Any help will be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
WEB-INF
中的资源是服务器私有的。这些资源不提供给浏览器。您可以通过在浏览器的地址栏中输入指向
WEB-INF
中的资源的 URL(以“http:”或“https:”为前缀)并按 Enter 键来进行检查。Resources in
WEB-INF
are private to the server. Those resources are not offered up to browsers.You can check this by typing an ('http:' or 'https:' prefixed) URL pointing to a resource in the
WEB-INF
into your browser's address bar and hitting enter.