0

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


UNION by itself is interpreted as using DISTINCT (probably because UNION is trying to mesh the two queries into one DISTINCT list inherently). Use UNION ALL.

4

1 に答える 1

1

..アーカイブ属性で相対 URI を指定する方法と、絶対 URI を指定する方法を教えてください。

例えば

相対的

// 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"

絶対の

// 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"

上で指定された Archive 属性は相対 URI ですか、それとも絶対 URI ですか?

絶対参考です。


通常、アプレットは、エンドユーザーのコンピューターから Jar をロードするべきではないことに注意してください (ただし、JRE によってローカルにキャッシュされている場合を除きますが、それはアプリからはすべて「見えません」)。それがおそらくここでの本当の問題です。

于 2012-04-05T20:09:48.110 に答える