指定在&lt属性;小程序>标签 [英] Specifying attributes in the <applet> tag

查看:524
本文介绍了指定在&lt属性;小程序>标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个小程序,存储在台式机和某门户网站的页面之一调用该applet的JAR文件。

我们有问题的小程序中的一些环境和调查不初始化导​​致检查那里的罐子被称为标记。

我们不知道我们是否需要使用'codeBase的'属性的标签。 (我们不能只是测试它很容易很遗憾。)

我们在applet标记迄今已是code'的属性,它是指定的,存档属性,它是指一个文件在本地机器是这样的:

 存档='文件:///WINDOWS/XYfolder/some.jar

W3C说,'codeBase的属性指定属性用于解决由CLASSID,数据和存档指定相对URI的基本路径。 缺席时,其默认值是当前文档的基本URI。(这意味着它会寻找我猜的服务器上的jar文件)。

有关存档W3C称,该属性可以用来指定的URI包含与对象相关的资源,其中可能包括由的classid和数据属性指定资源档案空格分隔的列表。 preloading档案一般会导致减少加载时间的对象。 指定为相对URI档案应该是间$ P $相对codeBase的属性PTED。

- 我的问题是你如何在存档属性指定一个相对URI,你如何指定一个绝对URI

- 上面是指定为相对或绝对URI存档属性

非常感谢


解决方案

  

..你怎么存档属性指定一个相对URI,你如何指定一个绝对URI?


例如

相对

  // icon.gif可以在一个兄弟到这个目录下的文件目录下找到
../docs/icon.gif
// icon.gif可以是孩子这个目录中的文档目录下找到
./docs/icon.gif

绝对

  //到网络资源的完整路径
HTTP://ps$c$c.org/media/stromlo2.jpg
//绝对路径到本地资源
文件:///WINDOWS/XYfolder/some.jar


  

以上是指定相对或绝对URI存档属性?


这是一个绝对的参考。


请注意,一个小程序不应该典型地被装载罐落终端用户的计算机(除非他们被JRE本地缓存 - 但是这是所有看不见的的应用程序)。这是最有可能真正的问题在这里。

We have an applet, a jar file that is stored on the desktops and one of the pages of a portal site calls this applet.

We have issues with the applet not initialising in some of the environments and the investigation led to checking the tag where the jar is called.

We are not sure whether we need to use the 'codebase' attribute in the tag. (And we can't just test it easily unfortunately.)

What we have so far in the applet tag is the 'code' attribute that is specified and the 'Archive' attributes which refers to a file on the local machines like this:

Archive='file:///WINDOWS/XYfolder/some.jar'

W3C says that the 'codebase' attribute specifies the base path used to resolve relative URIs specified by the classid, data, and archive attributes. When absent, its default value is the base URI of the current document. (which means it would look for the jar file on the server I guess).

For 'Archive' W3C says, this attribute may be used to specify a space-separated list of URIs for archives containing resources relevant to the object, which may include the resources specified by the classid and data attributes. Preloading archives will generally result in reduced load times for objects. Archives specified as relative URIs should be interpreted relative to the codebase attribute.

- My question is how do you specify a relative URI in the archive attribute and how do you specify an absolute URI?

- Is the Archive attribute specified above as relative or absolute URI?

Many thanks

解决方案

..how do you specify a relative URI in the archive attribute and how do you specify an absolute URI?

E.G.

Relative

// icon.gif can be found in the docs directory that is a sibling to this directory
"../docs/icon.gif"  
// icon.gif can be found in the docs directory that is a child to this directory
"./docs/icon.gif"

Absolute

// a complete path to a web resource
"http://pscode.org/media/stromlo2.jpg"
// an absolute path to a local resource
"file:///WINDOWS/XYfolder/some.jar"

Is the Archive attribute specified above as relative or absolute URI?

It is an absolute reference.


Note that an applet should not typically be loading Jars off the computer of the end-user (unless they were cached locally by the JRE - but that is all 'invisible' to the app.). That is most likely the real problem here.

这篇关于指定在&lt属性;小程序>标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆