Skip to main content
May 26, 2011
Question

Integration of the Fedict eID Applet in CF9

  • May 26, 2011
  • 1 reply
  • 895 views

Hi,

I try to integrate  the eID Applet (to read a card ID) developed by the Fedict in our CF9 environment.

Is there someone to explain me how to do this ?

Thanks in advance for your help

Paolo

    This topic has been closed for replies.

    1 reply

    Community Expert
    May 26, 2011

    The server-side components used by this applet are J2EE servlets. If you've installed the J2EE version of CF (available with CF Enterprise) you can install these servlets exactly as described in the documentation, then read the session variables created by these servlets into your CF session - you'll need to enable the J2EE session management option in CF to read them.

    Dave Watts, CTO, Fig Leaf Software

    http://www.figleaf.com/

    http://training.figleaf.com/

    Dave Watts, Eidolon LLC
    May 27, 2011

    I will try it, thank you for your advices

    Regards,

    Paolo

    June 1, 2011

    Hi,

    I installed all the jar file the lib of my application.  I also configured the web.xml like this :

    <!-- Start : FEDICT -->
        <servlet>
         <servlet-name>AppletServiceServlet</servlet-name>
         <servlet-class>be.fedict.eid.applet.service.AppletServiceServlet</servlet-class>    
        </servlet>
        <servlet-mapping>
         <servlet-name>AppletServiceServlet</servlet-name>
         <url-pattern>/applet-service</url-pattern>
        </servlet-mapping>
      <!-- End : FEDICT -->

    I developed two cfm pages to get information from my idCard :

    1) ReadData.cfm

    <script type="text/javascript" src="https://www.java.com/js/deployJava.js"></script>
    <script type="text/javascript">
        var attributes = {
            code: 'be.fedict.eid.applet.Applet.class',
            archive: 'eid-applet-package-1.0.1.GA.jar',
            width: 400,
            height: 300
        };
        var parameters = {
            TargetPage: 'AuthnResult.cfm',
            AppletService: 'applet-service',
            BackgroundColor: '#ffffff'
        };
        var version = '1.6';
        deployJava.runApplet(attributes, parameters, version);
    </script>

    2) AuthnResult.cfm

    <cfoutput>
    <cfset session="">
    <cfset sesion.Identity.Name="">
    <table>
        <tr>
            <th>
                Name
            </th>
            <td>
                #session.Identity.Name#
            </td>
        </tr>
    </table>
    </cfoutput>

    But,  it returns me the following error message :

    eID Applet - Copyright (C) 2008-2010 FedICT.
    Released under GNU LGPL version 3.0 license.
    More info: http://code.google.com/p/eid-applet/
    checking applet privileges...
    security manager permission check for java 1.6...
    checking web application trust...
    trusting localhost web applications
    warning: web application (applet resource) not trusted.
    running privileged code...
    eID browser applet version: 1.0.1.GA
    Java version: 1.6.0_21
    Java vendor: Sun Microsystems Inc.
    OS: Windows XP
    OS version: 5.1
    OS arch: x86
    Web application URL: http://localhost:8500/ReadData.cfm
    Current time: Wed Jun 01 11:26:51 CEST 2011
    session cookie detected
    sending message: HelloMessage
    current protocol state: null
    protocol state transition: INIT
    error: Unexpected end of file from server
    error type: java.net.SocketException
    at sun.net.www.http.HttpClient.parseHTTPHeader:-1
    at sun.net.www.http.HttpClient.parseHTTP:-1
    at sun.net.www.http.HttpClient.parseHTTPHeader:-1
    at sun.net.www.http.HttpClient.parseHTTP:-1
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream:-1
    at java.net.HttpURLConnection.getResponseCode:-1
    at be.fedict.eid.applet.Controller.sendMessage:208
    at be.fedict.eid.applet.Controller.run:274
    at be.fedict.eid.applet.Applet$AppletThread$1.run:602
    at java.security.AccessController.doPrivileged:-2
    at be.fedict.eid.applet.Applet$AppletThread.run:597
    at java.lang.Thread.run:-1
    Erreur générale.

    I know, something is wrong but I have no idea where is it .

    Thks for your help