Solution to using multiple jar files:
<PARAM NAME = ARCHIVE VALUE =
"MyOCFApplet.jar,base-core.jar,base-opt.jar,gemplus-rad-terminals.jar,gemplu
s-terminals-4.1.jar,gemplus-util.jar,pcsc_wrapper.jar,..." >
With all this data to transfer to a client PC an interesting article to look
at is:
http://www-106.ibm.com/developerworks/library/j-javapush/?dwzone=java
An advantage of an intranet is you don't really need to sign these jars.
Just somehow (I have not decided the best way yet) modify the user's
.java.policy file with something like:
grant codeBase
"file:C:/SHARED/JavaSmartCard/JavaAppPerso/MyOCFApplet/Deployment/bin/*" {
permission java.security.AllPermission;
};
whatever your codeBase may be, and however fine you wish to assign
permissions.
A neat piece of JavaScript I found to re-size an applet to fit in the
browser window is:
<!--
Resize javascript code by Francis Lu in JavaWorld Tips'n'tricks - no 80
Unfortunately doesn't work with Netscape due to java plugin 1.2.2 requiring
applets
to run out of an EMBED statement for Netscape. Works OK for IE though as
long as
ID="appletName" is added to OBJECT along with PARAM scriptable=true.
-->
<SCRIPT LANGUAGE="JavaScript">
function resize() {
var w_newWidth, w_newHeight;
var w_maxWidth = 1600, w_maxHeight = 1200;
if (navigator.appName.indexOf ("Microsoft") != -1)
{
w_newWidth = document.body.clientWidth - 23;
w_newHeight = document.body.clientHeight - 31;
} else {
var netscapeScrollWidth = 15;
w_newWidth = window.innerWidth - netscapeScrollWidth;
w_newHeight = window.innerHeight - netscapeScrollWidth;
}
if (w_newWidth > w_maxWidth) {
w_newWidth = w_maxWidth;
}
if (w_newHeight > w_maxHeight) {
w_newHeight = w_maxHeight;
}
if (navigator.appName.indexOf ("Microsoft") != -1)
{
document.all.myApplet.JSSetSize (w_newWidth, w_newHeight);
} else {
//document.embeds['myApplet'].JSSetSize (w_newWidth, w_newHeight);
}
window.scroll (0, 0);
}
window.onResize = resize;
window.onLoad = resize;
</SCRIPT>
in the applet tags:
WIDTH = 100% HEIGHT = 100% NAME = "MyOCFapplet"
Dan
-----Original Message-----
From: Zhi-qiang LIU [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 08, 2001 9:39 PM
To: Dan HOLMDAHL [GEMPLUS]
Cc: [EMAIL PROTECTED]; 'Cedric -'; 'Gunnar Osterode'; 'Catalin
Scintei'
Subject: Re: [OCF] Using reader in browser
Hi,
I ever run my OCF applet in IE sucessfully based on PCSC,but I have to
sacrifice the
security.Fortunately , my application is for intranet and all web site is
trustful.
The below is my configures:
-Set all classpath in your environment variables
-Install Java plugin
-Set the security level of your browser as lowest(maybe not necessary)
-Change your the "java.policy" in your JRE in order that your applet can
read
opencard.properties
Rgds
Zhi-Qiang
Dan Holmdahl wrote:
> Hi,
> I too have a functioning OCF GUI application which I would like to
run as
> an applet. With a few quick changes I had it running in the appletviewer,
> moving to an actual browser seems to be a different story.
> How do I deal with the fact that there are multiple jar files
needed for an
> applet? e.g.: MyOCFApplet.jar, comm.jar, base-core.jar, base-opt.jar,
> gemplus-terminals-4.1.jar, pcsc_wrapper.jar, etc. plus the PC_SC dll:
> OCFPCSC1.DLL and opencard.properties. Assuming that the user has a PC, IE
> or Netscape with Java 1.3 plugin, and a functioning reader (PC/SC
> installed). Will I need to digitally sign all jars, or perhaps just grant
> the codebase? Is there a way to put all the jars in one jar? Can I have
the
> browser automatically download all the jar files to a classpath accessible
> by the plugin? Can I programmatically add needed jar files to the
> classpath?
> Thanks,
> Dan
>
> -----Original Message-----
> From: Gunnar Osterode [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 01, 2001 3:15 AM
> To: Cedric -; [EMAIL PROTECTED]
> Subject: Re: [OCF] Using reader in browser
>
> Hi,
>
> as you can see in the mailing-list archive there are many problems running
> OCF in Browsers. In my opinion the best way is to use the Java2 Plugin.
> Just follow the description in Chapter 6 of the OCF Programmer's Guide!
>
> Kind regards
> Gunnar
>
> >Hi,
> >
> >Is there any way I can port my card application into an Internet browser
> >like IE?
> >
> >I am using the Gemplus GemXpresso RAD 211 international sample.
> >
> >Thanks very much.
> >
> >Regards.
> >
> >
> >----------
> >Get Your Private, Free E-mail from MSN Hotmail at
> ><http://www.hotmail.com>http://www.hotmail.com.
> >--- > Visit the OpenCard web site at http://www.opencard.org/ for more >
> >information on OpenCard---binaries, source code, documents. > This list
is
> >being archived at http://www.opencard.org/archive/opencard/ ! To
> >unsubscribe from the [EMAIL PROTECTED] mailing list send an email !
to
> >! [EMAIL PROTECTED] ! containing the word ! unsubscribe ! in
> >the body.
>
> ---
> > Visit the OpenCard web site at http://www.opencard.org/ for more
> > information on OpenCard---binaries, source code, documents.
> > This list is being archived at http://www.opencard.org/archive/opencard/
>
> ! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
> ! to
> ! [EMAIL PROTECTED]
> ! containing the word
> ! unsubscribe
> ! in the body.
>
> ---
> > Visit the OpenCard web site at http://www.opencard.org/ for more
> > information on OpenCard---binaries, source code, documents.
> > This list is being archived at http://www.opencard.org/archive/opencard/
>
> ! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
> ! to
> ! [EMAIL PROTECTED]
> ! containing the word
> ! unsubscribe
> ! in the body.
---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/
! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
! [EMAIL PROTECTED]
! containing the word
! unsubscribe
! in the body.
---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/
! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
! [EMAIL PROTECTED]
! containing the word
! unsubscribe
! in the body.