5

Just out of curiosity, between <applet> vs <object> for a Java applet, which one should I use? I know that <applet> is deprecated, however Sun still recommends the use of <applet>.

Is there any drawback between the two tags? Because when I use <object> for Mac in Safari, it causes a problem saying that the page can't load, even though the page loaded properly, and when I check the activity window it said that the class was not found/cancelled. For example:

enter image description here


Request Object becomes null in Jetty Handler

I have created a jetty server where in handler class, i am passing entire request to the Thread and submitting the thread to Threadpool for later execution. The Result is as :- For first request it is working correctly as per expectation.

From second request onwards, the request object becomes null in run() method but not in the constructor.

In the handler method, if i am doing the Thread.sleep() with any non negative time value then it is working correctly. even with time = 0 milisecond until the load becomes too high.

Is there any reason related to multithreaded execution environment ??

4

4 回答 4

6

applet如果您发现它更频繁地工作,请使用。该object元素是作为一种理论统一引入的,它将成为任何嵌入外部数据的包罗万象的东西。它从来没有很好地工作,现代 HTML 开发已经有效地放弃了统一的想法。HTML5 引入了audioand video,例如并保留img(逻辑统一肯定会弃用img,因为图像可以嵌入object)。

于 2012-04-09T16:47:52.507 回答
4

deployJava.js按照小程序信息中的说明使用。..

..为避免浏览器兼容性问题,Deployment Toolkit 脚本提供了 JavaScript 函数,可自动生成部署 RIA 所需的 HTML。开发人员应该调用这些函数以在各种浏览器中以一致的方式部署他们的解决方案。

然后你就不用担心脚本是否写了applet,objectembed元素。


作为旁白。从活动窗口复制/粘贴文本将比屏幕截图有用得多。现在我(眯着眼睛)看它,似乎只有两行以任何方式相关的输出是:

css/none不是类或 Jar,它们都不存在于服务器上。因此,该小程序存在的问题超出了用于部署它的 HTML 元素。

于 2012-04-09T16:47:02.757 回答
0

我认为孙有道理。HTML5 说:

小程序元素现在已过时,因此所有扩展框架(Java、.NET、Flash 等)都以一致的方式处理。

换句话说,由于理论上的纯粹性而不是因为任何实际问题,它不再有效。坦率地说,我发现<applet>在现实世界中使用起来更简单、更可靠,并继续使用它。

虽然可能会隐藏血腥的细节,但现实情况是,在某些情况下deployJava.js,它仍然在使用。<applet>

于 2012-04-09T16:57:01.540 回答
0

使用<object>. 在 HTML 4.01<applet>中已弃用。

除非您的目标是石器时代的环境,否则没有理由承认小程序标签的存在。

于 2012-04-09T16:22:33.197 回答