Currently, the login page of my web application will load a activeX component in order to access a desktop application installed on the client's PC. There is a ongoing change in the login procedure, we will be using applets instead. The problem is, I have to provide support for logging in using the activeX components as well for the transition period of 6 months.
Is there a way to load the applet or an activeX alternatively on the same jsp using the OBJECT tags? (ie. if the activeX component could be loaded, then do not load the applet. If the activeX component is not present then load the applet.)
I tried using nested OBJECT tags but its seems like the browser will try to load both objects. It prompted the warning that the webpage is trying to run a ActiveX component and after clicked on 'Ok' it tries to load the Applet as well.
<!-- Try to load ActiveX first -->
<OBJECT type="application/x-oleobject" ID="ActiveXLogin" CLASSID="clsid:xxxxxx" CODEBASE='/ocx/login.ocx' WIDTH="0" HEIGHT="0">
<!-- Load Applet if the ActiveX could not be found -->
<OBJECT CODEBASE='http://devt/applet' CODE='Applet/Login'
width='0' height='0' ARCHIVE='Login.jar' NAME=Login >
<PARAM NAME="legacy_lifecycle" VALUE="true">
<!-- End Applet -->
<!-- End ActiveX>