EmbeddedObject and absolute paths

Hi,

this may be a basic question, but it seems that the EmbeddedObject only works when the resource it references is within it's servlet container or web root.

Is there anyway to have it reference resources given there absolute path?

Thanks.

bbakerman's picture

The EmbeddedObjectUI class simply renders an object tag with whatever values you set in the EmbededObject properties.

addAttribute(obj, "classid", eb.getClassId());
addAttribute(obj, "codebase", eb.getCodeBase());
addAttribute(obj, "codetype", eb.getCodeType());
addAttribute(obj, "data", eb.getData());
addAttribute(obj, "type", eb.getContentType());
addAttribute(obj, "standby", eb.getStandBy());

So basically what every you specify in the CodeBase property will be used as the URL. This can be an absolute URL if need be. The following is take from the MSDN documentation of the OBJECT HTML tag :

<OBJECT ID="1234" WIDTH=32 HEIGHT=32
CLASSID="CLSID:F9043C85-F6F2-101A-A3C9-08002B2F49FB"
CODEBASE="http://activex.microsoft.com/controls/vb5/comdlg32.cab
#Version=1,0,0,0">
</OBJECT>