How to use ocx with javascript in jsf page

Hello,
Please i create a jsf page which purpose is to scan.
I used in a source of my jsf page an OCX with object tag like
<OBJECT ID="Ranger"
CLASSID="CLSID:1C5C9095-05A8-11D4-9AF9-00104B23E2B1">
</OBJECT>
i wrote my functions which use this ocx in javascript. Function that i call with clientlistener rear adf button
but it doesn't work
Could you please help me please VERY IMPORTANT

This my html code:
<SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportNewState(newState,previousState)>  
// Transport new state, fired every time the State changes on the control
// input params , are the new state and the previous state
//alert(newState);
var RangerTransportStates = {TransportUnknownState: -1, TransportShutDown: 0, TransportStartingUp: 1,
                              TransportChangeOptions: 2, TransportEnablingOptions: 3, TransportReadyToFeed: 4,
                              TransportFeeding: 5, TransportExceptionInProgress:6, TransportShuttingDown: 7};
if(newState == RangerTransportStates.TransportShutDown)
      document.getElementById('StartRanger').disabled = false;
      document.getElementById('EnableRanger').disabled = true;
      document.getElementById('StopFeeding').disabled = true;
      document.getElementById('StartFeeding').disabled = true;
      document.getElementById('ChangeOptions').disabled = true;
      document.getElementById('Shutdown').disabled = true;     
      document.getElementById('UserInstructions').innerHTML = "Press 'Startup Ranger' to initialize the Ranger control"
if(newState == RangerTransportStates.TransportChangeOptions)
      document.getElementById('StartRanger').disabled = true;
      document.getElementById('StartFeeding').disabled = true;
      document.getElementById('EnableRanger').disabled = false;
      document.getElementById('Shutdown').disabled = false;
      document.getElementById('UserInstructions').innerHTML = "<b>Ranger Started</b> <br> Press 'Enable Ranger' to enable the current Ranger Options and prepare to start feeding"
if(newState == RangerTransportStates.TransportReadyToFeed)
      document.getElementById('EnableRanger').disabled = true;
      document.getElementById('StopFeeding').disabled = true;
      document.getElementById('StartFeeding').disabled = false;
      document.getElementById('ChangeOptions').disabled = false;
      document.getElementById('Shutdown').disabled = false;
      document.getElementById('UserInstructions').innerHTML = "<b>Ready to feed </b><br> Press 'Start Feeding' to start Ranger Feeding checks from main hopper"
if(newState == RangerTransportStates.TransportFeeding)
      document.getElementById('StartFeeding').disabled = true;
      document.getElementById('ChangeOptions').disabled = true;
      document.getElementById('Shutdown').disabled = true;
      document.getElementById('StopFeeding').disabled = false;     
      document.getElementById('UserInstructions').innerHTML = "<b>Feeding... </b><br> Press 'Stop Feeding' to stop Ranger from Feeding checks"
getstatus();
</SCRIPT> 
<SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportChangeOptionsState(previousState)>  
//Fired when Ranger reaches the change option state, input params are previous state
getstatus();
</SCRIPT> 
<SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportReadyToFeedState(previousState)>  
//Fired when ranger is ready to feed the next item
getstatus();
</SCRIPT> 
<SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportFeedingStopped(reason,itemsFed,itemsrequested)>  
//Fired when feeding has stopped
getstatus();
</SCRIPT> 
<SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportItemInPocket(itemID)>  
//Fired when the item has been fed into the pocket
var RangerSides = {TransportFront: 0, TransportRear: 1};
var RangerImageColorTypes = {ImageColorTypeBitonal:0, ImageColorTypeGrayscale: 1, ImageColorTypeColor: 2};
// Note: SaveImageToFile() below is used to save gray scale images.  Please verify that 'NeedFrontImage2' and
//       'NeedRearImage2' are set to 'true' in the GenericOptions.ini file.  If bitonal images are to be saved,
//       please set 'NeedFrontImage1'/'NeedRearImage1' to 'true' before calling SaveImageToFile() for bitonal images.
document.getElementById('MICR').innerHTML = 'MICR: ' + Ranger.GetMicrText(1);
temp = Ranger.SaveImageToFile(RangerSides.TransportFront, RangerImageColorTypes.ImageColorTypeGrayscale, "C:\\test\\Testfront.jpg");
temp = Ranger.SaveImageToFile(RangerSides.TransportRear, RangerImageColorTypes.ImageColorTypeGrayscale,"C:\\test\\Testback.jpg");
//Here you could check to see if the images were saved, putting alternate
//text in place of the image if they werent saved.
document.getElementById('PIC').innerHTML = '<img height=200 width=400 src=' + '"Testfront.jpg">' + '<br>' + '<img height=200 width=400 src=' + '"Testback.jpg">';
getstatus();
</SCRIPT> 
<SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportNewItem()>  
// Fired when a new item has entered the track
getstatus();
</SCRIPT> 
<SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportShutDownState(currentState,previousState)>  
//Fired when the Ranger control has been shutdown
getstatus();
</SCRIPT> 
<SCRIPT LANGUAGE=javascript FOR=Ranger EVENT=TransportSetItemOutput(itemID)>  
//fired when the item is ready to have params set(pocketing decisions)
getstatus();
</SCRIPT> 
<!-- End of Events ------------- -->
<SCRIPT LANGUAGE="javascript">
function getstatus()
     document.getElementById('Status').innerHTML = 'Status: ' + Ranger.GetTransportStateString();
</SCRIPT>
</head>
<body>
<OBJECT ID="Ranger"
CLASSID="CLSID:1C5C9095-05A8-11D4-9AF9-00104B23E2B1">
</OBJECT>
<div id="container">
     <div id="banner" >
     </div>
     <div id="left">
          <h2>Ranger Control Buttons</h2>
          <br><div id="Status">Status:</div><br>
          <input class="controlbutton" id="StartRanger" type=button value="Startup Ranger" onclick="Ranger.Startup();">
          <input class="controlbutton" id="EnableRanger" disabled type=button value="Enable Ranger" onclick="Ranger.EnableOptions();">
          <input class="controlbutton" id="StartFeeding" disabled type=button value="Start Feeding" onclick="Ranger.StartFeeding(0,0);">
          <input class="controlbutton" id="StopFeeding" disabled type=button value="Stop Feeding" onclick="Ranger.StopFeeding();">
          <input class="controlbutton" id="ChangeOptions" disabled type=button value="Change Options" onclick="Ranger.PrepareToChangeOptions();">
          <input class="controlbutton" id="Shutdown" disabled type=button value="Shutdown Ranger" onclick="Ranger.Shutdown();">
     </div>
     <div id="content">
          <div id="UserInstructions">Press 'Startup Ranger' to initialize the Ranger control</div>
          <br>
          <div id="MICR"></div>
          <br>
          <div id="PIC"></div>
     </div>
     <div id="footer"><h1>Ranger Control</h1></div>
</div>
them jsf code:
<f:view>
<OBJECT ID="Ranger"
    CLASSID="CLSID:1C5C9095-05A8-11D4-9AF9-00104B23E2B1">
</OBJECT>   
  <af:document id="d1" title="Fiche Bordereau">
    <af:messages id="m1"/>
    <af:form id="f1">
      <af:pageTemplate viewId="/tempCompens.jspx" id="pt1">
       <af:resource type="javascript">
        // Transport new state, fired every time the State changes on the control
        // input params , are the new state and the previous state
        //alert(newState);
        var RangerTransportStates = {TransportUnknownState: -1, TransportShutDown: 0, TransportStartingUp: 1,
                              TransportChangeOptions: 2, TransportEnablingOptions: 3, TransportReadyToFeed: 4,
                              TransportFeeding: 5, TransportExceptionInProgress:6, TransportShuttingDown: 7};
        ok =false;
        var i = 0;
        if(newState == RangerTransportStates.TransportShutDown)
            document.getElementById('btn_demarre').disabled = false;
            document.getElementById('btn_active').disabled = true;
            document.getElementById('btn_arretscan').disabled = true;
            document.getElementById('btn_scan').disabled = true;
            document.getElementById('btn_changetat').disabled = true;
            document.getElementById('btn_arret').disabled = true;
            document.getElementById('UserInstructions').value = "Appuyer sur Demarrer pour initiliser le scanner"
        if(newState == RangerTransportStates.TransportChangeOptions)
            document.getElementById('btn_demarre').disabled = true;
            document.getElementById('btn_scan').disabled = true;
            document.getElementById('btn_active').disabled = false;
            document.getElementById('btn_arret').disabled = false;
            document.getElementById('UserInstructions').value = "Demarrage... Appuyer sur Activer pour preparer le scanning "
            ok = false;
        if(newState == RangerTransportStates.TransportReadyToFeed)
            document.getElementById('btn_active').disabled = true;
            document.getElementById('btn_arretscan').disabled = true;
            document.getElementById('btn_scan').disabled = false;
            document.getElementById('btn_changetat').disabled = false;
            document.getElementById('btn_arret').disabled = false;
            document.getElementById('UserInstructions').value = "Pret a scanner.   Appuyer sur Scanner pour lancer le scanning"
            ok = true;
        if(newState == RangerTransportStates.TransportFeeding)
            document.getElementById('btn_scan').disabled = true;
            document.getElementById('btn_changetat').disabled = true;
            document.getElementById('btn_arret').disabled = true;
            document.getElementById('btn_arretscan').disabled = false;
            document.getElementById('UserInstructions').value = "Scanning...  Appuyer sur Arret scanning pour stopper le scanning"
        getstatus();
       </af:resource>
       <af:resource type="javascript">
        //Fired when the item has been fed into the pocket
            var RangerSides = {TransportFront: 0, TransportRear: 1};
            var RangerImageColorTypes = {ImageColorTypeBitonal:0, ImageColorTypeGrayscale: 1, ImageColorTypeColor: 2};
        //alert(Ranger.GetGenericOptionFileName());
            Ranger.SetGenericOption("OptionalDevice","NeedFrontImage1",true);
            Ranger.SetGenericOption("OptionalDevice","NeedRearImage1",true);
            document.getElementById('cmc7').value = 'CMC7= '+Ranger.GetMicrText(1);
            var cmc7 = trim(Ranger.GetMicrText(1));
            cmc7 = cmc7.replace(" ","_");
            cmc7 = cmc7.replace(" ","_");
        //cmc7 = cmc7.substring(0,15);
            cmc7R = cmc7+"_R.jpg";
        //alert(Ranger.GetImageAddress(RangerSides.TransportFront, RangerImageColorTypes.ImageColorTypeGrayscale))
            function trim(myString)
                return myString.replace(/^\s+/g,'').replace(/\s+$/g,'')
            temp = Ranger.SaveImageToFile(RangerSides.TransportFront, RangerImageColorTypes.ImageColorTypeGrayscale, "C:\\Documents and Settings\\Koffi Ernest\\Mes documents\\NetBeansProjects\\Scan-project\\web\\"+cmc7R);
            window.onload = function()
              document.getElementById("verso").src = monfichierV();
            function monfichierR()
            //  nomfichier = nomfichier+"_R.jpg";
                var nomfichier = trim(Ranger.GetMicrText(1))+"_R.jpg";
                return  nomfichier
            cmc7V = cmc7+"_V.jpg";
            temp = Ranger.SaveImageToFile(RangerSides.TransportRear, RangerImageColorTypes.ImageColorTypeGrayscale,"C:\\Documents and Settings\\Koffi Ernest\\Mes documents\\NetBeansProjects\\Scan-project\\web\\"+cmc7V);
            window.onload = function()
                document.getElementById("verso").src = monfichierV();
            function monfichierV()
                var nomfichierV = trim(Ranger.GetMicrText(1))+"_V.jpg";
                return nomfichierV
            function getRImageUrl(img)
                var imageSrc = trim(Ranger.GetMicrText(1))+"_R.jpg";
                if(img.src != imageSrc)
                // don't get stuck in an endless loop
                img.src = imageSrc;
            function getVImageUrl(img)
             var imageSrc = trim(Ranger.GetMicrText(1))+"_V.jpg";
             if(img.src != imageSrc)
             { // don't get stuck in an endless loop
              img.src = imageSrc;
        document.getElementById('recto').source = cmc7R;
        document.getElementById('verso').source = cmc7V;
        getstatus();
       </af:resource>
        <af:resource type="javascript">
             document.getElementById('status').value = Ranger.GetTransportStateString();
        </af:resource>
        <f:facet name="temp">
          <af:panelSplitter id="ps1" splitterPosition="329"
                            inlineStyle="width:709px;">
            <f:facet name="first">
              <af:panelGroupLayout layout="scroll"
                                   xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                   id="pgl5">
                <af:panelGroupLayout id="pgl1">
                  <af:outputText value="Saisie des informations du bordereau"
                                 id="ot1"
                                 inlineStyle="font-size:small; font-family:inherit; color:Gray; font-weight:bold;"/>
                </af:panelGroupLayout>
                <af:panelFormLayout id="pfl1">
                  <f:facet name="footer">
                    <af:panelGroupLayout id="pgl4" layout="horizontal">
                      <af:commandButton text="Annuler" id="cb4"/>
                      <af:spacer width="5" height="10" id="s14"/>
                      <af:commandButton text="Scanner" id="cb5"
                                        action="success"/>
                    </af:panelGroupLayout>
                  </f:facet>
                  <af:spacer width="10" height="30" id="s2"/>
                  <af:panelGroupLayout id="panelGroupLayout1"
                                       layout="horizontal" valign="middle">
                    <af:inputText label="N° de compte                   " id="it1"/>
                    <af:spacer width="10" height="10" id="s16"/>
                    <af:commandButton text="..." id="cb3"/>
                  </af:panelGroupLayout>
                  <af:spacer width="5" height="3" id="s12"/>
                  <af:panelGroupLayout id="pgl2" layout="horizontal"
                                       valign="middle">
                    <af:inputText label="Nom du client         " id="it3"/>
                  </af:panelGroupLayout>
                  <af:spacer width="5" height="3" id="s17"/>
                  <af:panelGroupLayout id="pgl11" layout="horizontal"
                                       valign="middle">
                    <af:inputText label="N° bordereau    " id="it4"/>
                    <af:spacer width="5" height="10" id="s11"/>
                    <af:commandButton text="New" id="cb1"/>
                    <af:spacer width="2" height="10" id="s13"/>
                    <af:commandButton text="Find" id="cb2"/>
                  </af:panelGroupLayout>
                  <af:spacer width="5" height="3" id="s18"/>
                  <af:panelGroupLayout id="pgl3">
                    <af:inputText label="Nbre de chèque" id="it2"/>
                    <af:spacer width="5" height="3" id="s19"/>
                    <af:inputDate label="Date d'operation                  " id="id1"/>
                  </af:panelGroupLayout>
                  <af:spacer width="1000" height="10" id="s1"/>
                </af:panelFormLayout>
              </af:panelGroupLayout>
            </f:facet>
            <f:facet name="second">
              <af:panelGroupLayout layout="scroll"
                                   xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                                   id="pgl6">
                <af:outputText value="Resultat scanning" id="ot2"
                               inlineStyle="font-size:small; font-weight:bold; color:Gray;"/>
                <af:panelTabbed id="pt2"
                                inlineStyle="height:498px; width:680px;">
                  <af:showDetailItem text="Scanning" id="sdi1">
                    <af:panelSplitter id="ps2" splitterPosition="103"
                                      inlineStyle="width:433px; height:436px;">
                      <f:facet name="first">
                        <af:panelGroupLayout id="pgl7" layout="vertical">
                          <af:outputText value="Liste de contrôles" id="ot3"
                                         inlineStyle="font-weight:bold; color:Gray;"/>
                          <af:spacer width="10" height="10" id="s20"/>
                          <af:outputText id="status"/>
                          <af:spacer width="10" height="10" id="s8"/>
                          <af:commandButton text="Demarrer      "
                                            id="btn_demarre">
                            <af:clientListener type="click"
                                               method="Ranger.Startup()"/>
                          </af:commandButton>
                          <af:spacer width="10" height="10" id="s7"/>
                          <af:commandButton text="Activer              "
                                            id="btn_active"
                                            disabled="true">
                            <af:clientListener method="Ranger.EnableOptions()"
                                               type="click"/>
                          </af:commandButton>
                          <af:spacer width="10" height="10" id="s6"/>
                          <af:commandButton text="Scanner       "
                                            id="btn_scanne"
                                            disabled="true">
                            <af:clientListener method="Ranger.StartFeeding(0,0)"
                                               type="click"/>
                          </af:commandButton>
                          <af:spacer width="10" height="10" id="s3"/>
                          <af:commandButton text="Arrêt Scan   "
                                            id="btn_arretscan"
                                            disabled="true">
                            <af:clientListener method="Ranger.StopFeeding()"
                                               type="click"/>
                          </af:commandButton>
                          <af:spacer width="10" height="10" id="s4"/>
                          <af:commandButton text="Changer Etat"
                                            id="btn_changetat"
                                            disabled="true">
                            <af:clientListener method="Ranger.PrepareToChangeOptions()"
                                               type="click"/>
                          </af:commandButton>
                          <af:spacer width="10" height="10" id="s5"/>
                          <af:commandButton text="Arrêter         "
                                            id="btn_arret"
                                            disabled="true">
                            <af:clientListener method="Ranger.Shutdown()"
                                               type="click"/>
                          </af:commandButton>
                        </af:panelGroupLayout>
                      </f:facet>
....Edited by: nesta on 21 juil. 2010 07:07

Similar Messages

  • How to use Apache MyFaces components in JSF pages + Eclipse?

    I've managed to write my JSF web app. in Eclipse jee, and test it on JBoss 4.2 GA, within Eclipse, but how to import Apache MyFaces components into Eclipse JSF plug-in?
    If I can't import it nicely, how to use those components directly in JSF pages?

    The Tomahawk component library provides MyFaces components. Install it as you would any other component library.
    http://myfaces.apache.org/tomahawk/

  • Javascript error on - Help - Learn how to use Numbers with this online...

    I am trying to find out more about Numbers. I am using iTunes 9.1.1 on a Vista PC. I get a Javascript error in Internet Explorer 8 when I try to access:
    Help - Learn how to use Numbers with this online resource.
    http://help.apple.com/numbers/1.0
    The link redirects to the following page:
    http://help.apple.com/iwork/safari/interface/#tan727163ed
    The above page is blank except for boxes for Keynote Help, Pages Help, Numbers help, and a blank input field that seems to do nothing. Here is the Javascript error message from Internet Explorer 8:
    Webpage error details
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30729)
    Timestamp: Tue, 1 Jun 2010 20:55:54 UTC
    Message: This command is not supported.
    Line: 1
    Char: 41589
    Code: 0
    URI: http://help.apple.com/iwork/safari/interface/javascript.js

    Link also does not work for me in WIN 7 with IE8. However, it does work in Chrome in WIN 7. It also works in Safari on my G4. Suggest you try Chrome or it may work in another browser like FireFox or Safari in Vista.

  • How to use Terminal with KeySpan USB serial adaptor cable?

    I own a KeySpan model USA-19HS to use with our MacBookPro when working on clients networking equipment that require serial communication. I have used ZTerm with excellent luck, but it costs, and is yet another application that I dont really want. I would like to know if any one out there has exacing instructions on how to use Terminal with this adaptor. If I could write a file that had, say, the couple most common settings (9600-8-n-1, 57600-8-n-1, et cetera) that I could simply click on, to open a new Terminal window with those settings, then simply close that, and open a new window (apple+n) in order to get back to a default settings terminal window. All feedback is most appreciated.
    Thanks so much, Jason Sjobeck

    Hi, Jason. Welcome to the Discussions.
    You wrote: "All feedback is most appreciated."OK.
    1. Have you considered discussing this with Keyspan Support?
    2. Have you read the section "OSX has Terminal.app - why do I need ZTerm?" on the ZTerm Home Page? That seems to explain why one needs an app like ZTerm.
    3. A quick search of Keyspan's FAQ for your product and terminal doesn't yield much more than how to find the serial ports using Terminal.
    Likewise, this Google search also yields little, and variants of that search of such weren't particularly help either.
    It appears your inquiry seems to be a somewhat esoteric topic.
    4. Apparently, ZTerm X is a bit long in the tooth and there's no Universal Binary for it. It sounds, however, like you've tried it running on your MBP under Rosetta, yes?
    5. In researching alternatives to ZTerm for you, I note the followng:• The comment from "Reverb" on this page suggests C-Kermit or Kermit as a free alternative.
    • This tip on Mac OS X Hints cites Minicom as another option.6. You may want to try your question on the Unix Discussion.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X

  • How to use variables with

    I need to get the number of lines in internal table, which would
    be easy, using DESCRIBE TABLE itab LINES lines. But the problem
    is, that I get the name of this internal table in the field of
    another internal table, so I have to use the name of internal
    table as variable, but I don't know how to use variables with
    DESCRIBE TABLE (or if this is possible).

    Hi,
    REPORT ZPRUEBA782 .
    define two tables with diferent structures.
    data: begin of table1 occurs 0,
    registro type i,
    end of table1.
    data: begin of table2 occurs 0,
    registro type i,
    repid like sy-repid,
    end of table2.
    data: rows type i.
    start-of-selection.
    fill them with data
    do 1000 times.
    table1-registro = sy-tabix.
    append table1.
    enddo.
    do 1757 times.
    table2-registro = sy-tabix.
    table2-repid = sy-repid.
    append table2.
    enddo.
    call a form that receives as input the table and returns the number
    of rows as output.
    perform howmanyrows tables table2 changing rows.
    break-point. "evaluate the number of rows
    perform howmanyrows tables table1 changing rows.
    break-point. "evaluate the number of rows
    end-of-selection.
    form howmanyrows tables itable changing rows.
    rows = 0.
    loop at itable.
    add 1 to rows.
    endloop.
    endform.
    You can try it if you don't find a better solution.
    Cheers,
    Chaitanya.

  • How to Use Gmail With Apple's Mail?

    Answer:
    Now Itis not a Problem, Please go to this link and know how to solve this problem, Ihave configuir this in my mac pro. Have enjoy.
    http://picturemuseum.blogspot.com/2011/08/how-to-use-gmail-with-apple-mail.html
    http://mobilesuggestion.blogspot.com/2011/08/how-to-use-gmail-with-apples-mail.h tml

    I notice that it's possible to have sticky posts in these forums. See
    http://forum.java.sun.com/forum.jspa?forumID=534
    the Concurrency forum for an example. Posting a link to the FAQ in a sticky post might reduce the number of FAQs asked here by maybe 1%? Or posts like this one might do well as a sticky?

  • How to use Count with Date Parameters

    Hello,
    I am having issues using the Count() function in conjunction with date parameters.
    This is a Siebel report and in my report I have 2 date parameters(From Date, To Date). In a nutshell I am basically trying to count Opportunities that has a start date within the given date period. However I don't see a reasonable way to put my date parameters within the Count() function. The reason being is that I need to have a huge chunk of code to convert the dates into a common format that can be compared, and it won't even fit within the code block in my rtf template. I am not even sure how to put multiple conditional statements inside a Count() function since all the examples I have seen are very simple.
    Anyone have a suggestion on how to use Count() with date parameters?
    Thanks.

    Any chance you can get the date formats in the correct format from siebel?
    I don't know Siebel - so I can't help you with that. If you get the correct format it is just
    <?count(row[(FromDate>=date) and  (date<=ToDate))?>
    Otherwise the approach would probably need to use string function to get year/monthd/day from the date
    and store it into a varialbe and compare later the same way
    <?variable@incontext:from; ....?>
    <?variable@incontext:to; ...?>
    <?count(row[($from>=date) and  (date<=$to))?>
    Potentially you can use the date functions such as xdofx:to_date to do the conversion
    [http://download.oracle.com/docs/cd/E12844_01/doc/bip.1013/e12187/T421739T481158.htm]
    But I am not sure if they are available in your siebel implementation.
    Hope that helps

  • How to use javap with jar files ?

    how to use javap with jar files ?
    thanks

    As long as the jar is on the class path, your gold. So,
    javap -classpath myjar.jar mypackage.MyClass
    Chuck

  • How to use log4net with C# clients

    Hi,
    Can anybody please give an example of how to use log4net with C# clients? Foe java clients you can use the
    <logging-config>
    <destination>log4j</destination>
    How do we use it with C# clients? Any example will be appreciated.
    Thanks.
    -ali

    Ali,
    The following is an example on how to define a custom logger (including log4net) in tangosol-coherence-override.xml for coherence .NET client; you need Coherence .NET client 3.7.1 patch 1.
    <coherence xmlns="http://schemas.tangosol.com/coherence">
    <logging-config>
    <destination>common-logger</destination>
    <logger-name>log4net</logger-name>
    <severity-level>9</severity-level>
    <message-format>(thread={thread}): {text}</message-format>
    <character-limit>8192</character-limit>
    </logging-config>
    </coherence>
    You also need to configure log4net in app.config. Please see the following web page for more information:
    http://netcommon.sourceforge.net/docs/2.0.0/reference/html/ch01.html
    -Luk

  • How to use assert with wireless toolkit?

    Hi,
    I am trying to find out how to use assert with wireless toolkit. I have found that I need to pass "-source 1.4" to the java compiler. But I can't find any documentation on how to do it.
    I'm using J2ME Wireless Toolkit 2.2.
    thanks
    Ludde

    Here's a quote from an article on Java World at http://www.javaworld.com/javaworld/jw-11-2001/jw-1109-assert.html
    "To support the new assertion facility in J2SE 1.4, the Java platform adds the keyword assert to the language, an AssertionError class, and a few additional methods to java.lang.ClassLoader."
    So I really think it's part of 1.4.

  • How to use setSoTimeOut() with socket ??

    HI All!
    I eagerly need to know how to use setSoTimeOut() with socket (on server side).
    Actually the scenario is that My Server accepts connection and waits for connected client to send data to it. I WANT TO KEEP, IF CLIENT DOENS'T SENDS ANY DATA TO SERVER WITHIN 5 min. THEN SERVER MUST CLOSE THE CONNECTION, BUT IF SERVER RECEIVES STILL A BYTE FROM THE CLIENT WITHIN 5 mins., THE SERVER MUST RESET CHECKING TIME OUT FOR NEXT 5 MINUTES.
    How can i do that??
    Any help with example will be appreciated!!
    Thanx in advance

    you'd have to do something like this:
    (this is all assuming you want to read Strings from the socket. setSoTimeout works for any read() call to the InputStream associated with the Socket)
    ServerSocket ss = new ServerSocket(myPort);
    Socket s = ss.accept();
    s.setSoTimeout(5*60*1000); // 5 mins * 60 secs * 1000ms
    BufferedReader in = new BufferedReader(new InputStreamReader(s.getInputStream()));
    boolean running = true;
    while(running)
    try
    String readIn = in.readLine();
    // do whatever you want with the data read
    catch(SocketTimeoutException)
    running = false;
    Now. That's what I think needs to be done. I don't have Java on the machine I'm currently on, so I can't test/verify it, but it goes something like that.
    Good luck,
    Radish21

  • How to use I18N with a custom validator?

    This is my custom validator:
        public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException
            Pattern pat=Pattern.compile(".+@.+\\.[a-z]+");
            Matcher m= pat.matcher(value.toString());
            if(!m.find())
                FacesMessage message = new FacesMessage("Not a valid e-mail address");
                throw new ValidatorException(message);
        }Instead of providing the text "Not a valid e-mai address", I'd like to get the text out of my ApplicationResources property file.
    How can I do this?
    I know how to use it with the provided validators, but not with own custom ones
    Please help me out, thanks

    I found a solution for this problem, I don't know it's best practice but here it is :
        public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException
            String errortext;
            Pattern pat=Pattern.compile(".+@.+\\.[a-z]+");
            Matcher m= pat.matcher(value.toString());
            if(!m.find())
                ResourceBundle bundle =
                ResourceBundle.getBundle("be.vdab.resources.ApplicationResources", context.getViewRoot().getLocale());
                errortext = bundle.getString("erroremail");
                FacesMessage message = new FacesMessage(errortext);
                throw new ValidatorException(message);
        }

  • How to use x264 with FCPX

    I used the automatic installer for x264.
    There were no instructions on how to use it with FCPX or compressor.
    Can someone offer a tip?
    Thanks
    10.6.8
    iMac 2009,1

    Youn can't use it in FCP, only with Compressor. In Compressor make a new QuickTime preset or duplicate an Apple preset and change the codec to x264.

  • How to use stylus with ipad2

    Just bought a stylus for taking notes but do not know how to use it with the ipad2? Some special apps required?
    Thanks!

    Take a look at Memo, Penultimate, and Draw Pad to name a few. Several in the app store.But you do need an app that will accept input using a stylus or your finger rather than the keyboard. Several art/drawing programs are available as well.

  • How to use Skype with FaceTime with iMac,iPad & iPhone?

    How to use Skype with FaceTime with iMac,iPad & iPhone?

    Skype does not interface with FaceTime. You cannot use one to contact a person who is using the other.

Maybe you are looking for

  • Cannot change location of catalog folder in Photoshop 2.0

    I keep trying to edit the folder name for storing catalogs in the Edit/Preferences menu but each time I go to File/Catalog/Open it does not recognize my change and goes somewhere else.

  • [HELP}-Flash or Videos in Safari?

    Well i frequntly use my Iphone all night to speak to friends,Watch Youtube How tos, and listening to music but recently i have tryed viewing videos on Safari and they just don't work :l. And i have tryed playing Flash Games same little icon telling m

  • Turn off Parallel Query for instance

    I have a new 10g RAC instance, on Windows 2003 64, which was just converted from 8i. It is currently a 1 node cluster. The database was built with parallelism turned on and now we are experiencing severe performance degradation. Quest spotlight keeps

  • Can I play what is on my iPad 2 through my apple tv?

    Can I play what is on my iPad 2 through my apple tv?

  • Eliminating Weekends and user defined public holidays.

    Hi, This is my query to date: WITH cla_case AS ( SELECT 1 event_no, to_date('01/10/2011','dd/mm/yyyy') discover_date, to_date('02/10/2011','dd/mm/yyyy') notification_date from dual union all SELECT 2 event_no, to_date('02/10/2011','dd/mm/yyyy') disco