Signed applet and javascript communication

Hi All,
I have an (jar) signed applet which I use to access system properties (e.g user.home). I also have a javascript code that communicates (call to a public function) with the applet to get the property "user.home" from the applet. Everything works fine in Java plugin 1.3 but since I have installed the latest plugin 1.4.2_01 from http://www.java.com/en/download/windows_automatic.jsp website I can not access the system properties even though everything in the code is same.
I can however still access public functions/variables from the same applet which do not access system properties in the new plugin 1.4.2_01.
The browser I am using is IE and OS is Windows 2000.
Does anybody know if Sun has changed the security policy for 1.4.2_01, in the new plugin for java-javascript communication to block access to functions which uses system property,fileIO, socket etc. even if they are signed applet??
Thanks in advance..

When invokin applet methods via javascript, you are accessing privileged actions from an unsafe source.
Depending on your needs, you could either load the system variables in applet init into class variables and return the information contained in the class variables to javascript or wrap the method calls inside AccessController.doPrivileged() calls.

Similar Messages

  • Java Applet to Javascript Communication

    There is a Java Applet which digitally signs files after taking
    private key from a smart card.This applet takes external files.
    I want to do this "Generate digital signature of a web page with the
    help of an applet of which the applet is itself a part"
    I am trying using Java Applet to Javascript Communication.
    I am able to access the object which represents the HTML document.
    That abject is represented by document itself.
    Now I have to somehow generate the whole webpage i.e. like we view in a
    notepad like this:
    <HTML>
    <Title>my page</title>
    Then write into a file and then that file can be signed.
    This is what I feel.
    In C#.net there is a method .innerhtml.
    Does such kind of a method exists in Java.???
    I m searching but cudn't get till now.
    Will serialization work??

    Kindly forget the previous post. Read the following:
    JSObject browserWindow = JSObject.getWindow(this);
    JSObject doc = (JSObject)browserWindow.getMember("document");
    Here doc represents the object of the HTML document.
    This is accessed using Java Applet JavaScript Communication.
    I want to serialize the object represented by doc.
    Then write it into a file and generate it's digital signature.
    In the below written line the parameter fileName is passed.
    CertificationChainAndSignatureBase64 signingResult = signFile(fileName);
    For this I have added few lines in the code written below.
    see first 10-30 lines. Though this code gets compiled but it is not running. When I want to sign the file , it throws an error
    "Unexpected error:sun.plugin.javascript.ocx.JSObject"
    This code is just one class. Two other classes are needed to completely test the code.
    Should I post them ??
    Kindly see what is the error.
    I will be highly grateful and Sorry for confusing in the previous mail...
    private void signSelectedFile() {
    try {
    // Get the file name to be signed from the form in the HTML document
    JSObject browserWindow = JSObject.getWindow(this);
    JSObject mainForm = (JSObject) browserWindow.eval("document.forms[0]");
    String fileNameFieldName = this.getParameter(FILE_NAME_FIELD_PARAM);
    JSObject fileNameField = (JSObject) mainForm.getMember(fileNameFieldName);
    //This is another modification
    //String fileName = (String) fileNameField.getMember("value");
                   //here we get the document......
    JSObject doc = (JSObject)browserWindow.getMember("document");
    //String docum = doc.toString();
    String thePage = "as";
                   FileOutputStream out = new FileOutputStream(thePage);
                   ObjectOutputStream s = new ObjectOutputStream(out);
                   s.writeObject(doc);
                   String fileName = thePage;
                   JOptionPane.showMessageDialog(this, fileName); //"Unexpected error: " + e.getMessage());
    // Perform the actual file signing
    CertificationChainAndSignatureBase64 signingResult = signFile(fileName);
    if (signingResult != null) {
    // Document signed. Fill the certificate and signature fields
    String certChainFieldName = this.getParameter(CERT_CHAIN_FIELD_PARAM);
    JSObject certChainField = (JSObject) mainForm.getMember(certChainFieldName);
    certChainField.setMember("value", signingResult.mCertificationChain);
    String signatureFieldName = this.getParameter(SIGNATURE_FIELD_PARAM);
    JSObject signatureField = (JSObject) mainForm.getMember(signatureFieldName);
    signatureField.setMember("value", signingResult.mSignature);
    } else {
    // User canceled signing
    catch (DocumentSignException dse) {
    // Document signing failed. Display error message
    String errorMessage = dse.getMessage();
    JOptionPane.showMessageDialog(this, errorMessage);
    catch (SecurityException se) {
    se.printStackTrace();
    JOptionPane.showMessageDialog(this,
    "Unable to access the local file system.\n" +
    "This applet should be started with full security permissions.\n" +
    "Please accept to trust this applet when the Java Plug-In ask you.");
    catch (JSException jse) {
    jse.printStackTrace();
    JOptionPane.showMessageDialog(this,
    "Unable to access some of the fields of the\n" +
    "HTML form. Please check the applet parameters.");
    catch (Exception e) {
    e.printStackTrace();
    JOptionPane.showMessageDialog(this, "Unexpected error: " + e.getMessage());
    }

  • Signed applet and HTML parameters

    I've created a signed applet and everything works fine, except for the fact that i can't add parameters to the applet.
    Without the parameters in the HTML the applet inits and starts and can be used without problems. But when I add paramaters, the applet reports a "class not found exception".
    I used HTML-converter to convert the applet tag to object/embed tags.
    Has anyone had the same problem or knows what I'm doing wrong? I'd really appreciate some help.
    Thanks in advance,
    Erik
    My HTML source:
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    WIDTH = "600" HEIGHT = "400" codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
    <PARAM NAME = CODE VALUE = "TNA" >
    <PARAM NAME = ARCHIVE VALUE = "TNA.jar" >
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.3.0">
    <PARAM NAME="scriptable" VALUE="false">
    <COMMENT>
    <EMBED type="application/x-java-applet;version=1.3.0" CODE = "TNA" ARCHIVE = "tna.jar" WIDTH = "600" HEIGHT = "400" scriptable=false pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"><NOEMBED></COMMENT>
    </NOEMBED></EMBED>
    </OBJECT>
    <!--
    <APPLET CODE = "TNA" ARCHIVE = "tna.jar" WIDTH = "600" HEIGHT = "400">
    </APPLET>
    -->

    Try this:
    OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
    WIDTH = "600" HEIGHT = "400" codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
    <PARAM NAME = "java_code" VALUE = "TNA.class" >
    <PARAM NAME = "java_archive" VALUE = "TNA.jar" >
    <PARAM NAME = "java_type" VALUE="application/x-java-applet;version=1.3.1">
    <PARAM NAME="scriptable" VALUE="false">
    <COMMENT>
    <EMBED type="application/x-java-applet;version=1.3.0" CODE = "TNA" ARCHIVE = "tna.jar" WIDTH = "600" HEIGHT = "400" scriptable=false pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"><NOEMBED></COMMENT>
    </NOEMBED></EMBED>
    </OBJECT>
    <!--
    <APPLET CODE = "TNA" ARCHIVE = "tna.jar" WIDTH = "600" HEIGHT = "400">
    </APPLET>

  • JRE 1.4.x Plugin - Signed Applets and Weird Behaviour (Policy)

    Hello.
    I have recently experienced some strange behaviour related to signed applets and policy files in JRE 1.4.2-b28 ( a friend got the same behaviour in a flavour of 1.4.1-xx as well ). Both tests were on Windows 2000 Professional platforms.
    Initially my unsigned applet, which attempts socket connections to a server different from the download location, fails with security exceptions ( as expected ). Then I did the following to sign the applet jar and configure my environment
    Steps: 1) Import "trusted CA" certificate into ${java.home}/lib/security/cacerts. (JRE home outside the JDK)
    2) Signed the jar using jarsigner and a certificate generated from the "trusted CA" (Entrust CA and certificate).
    3) Imported the signing certificate into the Java plugin using import in the plugin control panel.
    4) Created a new keystore (keytool,jks) and imported the signing certificate into the keystore with alias "developer". The keystore is stored in the user home as .keystore.
    5) Created a .java.policy for the user and attaching the keystore in 4) to it. ( also stored in user home ).
    6) Used the policy tool to grant socketpermissions to the specific codebase ( testing with file:/C:/test/* initially ) signed by "developer"
    After this, when I ran the test page under IE 5.5SP2 and Netscape 7.1 it worked without any security exception. Ditto for using the appletviewer and the policy file I created for the user.
    The weird part occurred when I removed the policy entry from the user policy file. After doing this, Netscape and IE still allow the applet to execute - somehow remembering that it was granted permissions at some point. The appletviewer does not allow it to execute, generating security exceptions.
    It appears the old policy is being cached somewhere, but I cannot find where. If I replace the applet jar with an unsigned version it does fail in IE and Netscape. I tried cleaning the plugin cache and removing the "deployment.certs" files related to the users but still get the same behaviour.
    Does anyone know where the old policy information is being stored ? Does anyone know how to revoke the permissions so that I am restored to my original base environment ( no permissions for "designer" signed applets ) ? Would attempting to utilize the AccessController.doPriveleged( xxxx ) operations in JDK 1.4 avoid all of this confusion with policy files, keystores and certificate storage ? After all the messing about I would like a zero-footprint alternative ( or minimzed footprint anyway ).
    Any ideas would be most welcome.
    Regards,
    James.

    Hello Again.
    I am either enlightened or confused at this point. I found that as long as all of my related Jars are signed ( even by self-signed certificates ) I am granted SocketPermissions for calls outside of the originating server. Unsigned code is refused, but even when the Jars were signed using a self-signed certificate the Socket calls were allowed.
    Am I experiencing the appropriate behaviour in this case ( which would mean not having to utilize policy files to distribute an applet that uses calls to arbitrary servers - e.g. JavaMail ) or am I suffering from something damaged in my environment ?
    It has been a long time since I played with signed applets and I am having difficulty determining what operations require policy file entries/AccessController.doPrivileged() calls and which are granted when a user elects to trust a signed applet without policy.
    Any assistance in clearing up my confusion would be appreciated.
    Regards,
    James.

  • Problem with accessing Signed Applet from javascript method

    Hi,
    I am facing the following problem while accessing Signed Applet from javascript method.
    java.security.AccessControlException: access denied (java.io.FilePermission c:/temp.txt read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at FileTest.testPerm(FileTest.java:19)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.invoke.JSInvoke.invoke(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
         at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)
         at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)
         at sun.plugin.com.DispatchImpl$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
    I am using jdk1.5 for my development...
    Can anyone help to resolve this security issue. Urgent...
    Thanks in advance.

    Hey thanks. I wasn't able to get it to work with that sample but I did find this very similar code that does allow javascript to call JFileChooser in an applets public method.
    java.security.AccessController.doPrivileged(
    new java.security.PrivilegedAction()
    public Object run(){                           
    //do your special code here
    return null; //return whatever you want
    It seems a bit tempermental in that if you don't select a file quickly, it will hang the browser....no perfect solution but I'm going in the right direction.
    Thanks,
    Scott

  • IIS, Javascript, Signed Applet and ASP Blank Page Problem

    Hi,
    I'm having a problem using a Signed Applet in a site that runs in a IIS (Windows Server 2003).
    My aspx web page uses the applet to read my smart card and get information from it.
    This applet uses an auxiliar dll (stored in a second Signed Jar file) in order to read the information from my smart card.
    The way the solution is design:
    1) Aspx page is asked from server
    2) Internet Explorer recieve the page and asks the server for it content (images, applet, javascripts, etc)
    3) After this the JVM runs (console opens)
    4) After the Aspx page render fully a javascript register onload fires and call an applet method
    5) Applet receive the call and run the logic of the method:
         - reads the smart card;
         - calls Javascript function in order to fill aspx fields with information from smart card
         - calls Javascript function the simulates a click in a botton of aspx page (in order to call server side part sending data readed from smart card to server)
    5) The server makes some logic with the information receive and responds to client registering in aspx page a call to another Javascrit function
    6) The client received the asnwer from server and runs the Javascript function registered on step 5)
         This Javascript calls another method from applet and runs the following logic:
         - reads more information from smart card;
         - call javascript function in order to fill more fields of aspx page with the information readed
         - calls Javascript function the simulates a click in a botton of aspx page (in order to call server side part sending data readed from smart card to server)
    7) The server makes some logic and call another pages with no Applets
    8) Client asks for a second page with the same applet and we start with another logic express on steps 1);2);3),4);5) and then 7).
    This is all ok, until sometimes the server stop responding correcly for requests regarding this two pages with the Applet.
    When this happens the server just responds with a blank page.
         - with fiddler I can seer the request for the aspx page (that uses the applet)
         - but server responds with a blank html page
    The JVM doesn't fire.
    The IIS log don't show errors.
    The eventviewer doesn't show errors.
    The problem is solved with an IIS reset or a Application Pool reset.
    After a while the problem returns.
    This problem occours for other user in another machine, the server just stops responding correcly to request regarding pages with applets, the other pages still continue to work.
    If we disable Java Control Panel->Advanced->Java Plug-in->Enable the next-generation Java Plug-in the problem seend to stop, but we can't force all clients to disable this option right?
    Or there is a way to force the Applet to run with this option disabled?
    As anyone experience similar problem?
    Regards,
    OF

    This is all ok, until sometimes the server stop responding correcly for requests regarding this two pages with the Applet.
    When this happens the server just responds with a blank page.
    - with fiddler I can seer the request for the aspx page (that uses the applet)
    - but server responds with a blank html pageWell, if http requests look identical in case of success and failure (pay attention to cookies, etc) then it has to be something on the server side.
    It could be that server gets into this wrong state because of previous requests made by applet but it is hard to tell.
    I am not clear how old/new plugin can make a difference unless your applets run in the legacy mode (i.e. you are actually trying to reuse SAME instance of the applet when
    it is loaded next time).
    I'd start with
    1) carefully comparing good/bad sessions
    2) checking whether server will serve correct response to another client when it serves "bad" page for current client
    3) add debug statements to aspx - it is scripted page, may be some condition is not met and then it returns blank?
    4) record all http requests in one session until you get to "error" state and then use any http server testing tool to "replay" this set of requests.
    You should be able to get server into the same state without use of applet. Then you can try to tweak set of requests to see what makes a difference.

  • How to access a file via Applet and JavaScript

    I want to copy one file on the client machine from one place to another place from a Java Bean.
    To do this I created an applet and a Java Bean as follows:
    import java.applet.*;
    public class FileUtils extends Applet {
        public void copyFile(String src, String dest)  {
        private String source, destination; // setters/getters are there of course
        public void copyFile(ActionEvent actionEvent) { // Bean
            FacesContext fctx = FacesContext.getCurrentInstance();
            ExtendedRenderKitService erks = Service.getRenderKitService(fctx, ExtendedRenderKitService.class);
            String command = "var s = '"+ source +"'; var d ='" + destination +"'; " +  " document.fileUtilsApplet.copyFile(s, d); ";
            erks.addScript(fctx, command);
        }Then I added the APPLET tag referencing the above class in the page fragment:
                    <f:verbatim>
                        <applet code="FileUtils.class" name="fileUtilsApplet" height="30"
                                archive="/context-root/Applet.jar"
                                width="200">
                        </applet>
                    </f:verbatim>From the Java console I can see the jar is successfully downloaded, but when the code in the bean is executed, the JavaScript code does not seem to do anything, as if the "copyFile" public method was not called at all and no output in the Java Console as well.
    Note that I already followed the guidelines at http://www.oracle.com/technetwork/developer-tools/adf/learnmore/71-adf-to-applet-communication-307672.pdf .
    Do you have any ideas?

    Ok, I can see the permission problem now:
    java.security.AccessControlException: access denied (java.io.FilePermission c:\myfile.txt read)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkRead(Unknown Source)
         at java.io.FileInputStream.<init>(Unknown Source)
    Edited by: user10047839 on 1-feb-2013 7.29
    signing the Jar and downloading the certificate permanently does not change anything in Firefox. The Java console keeps giving the above exception.
    Any idea?

  • Calling1.4.1 signed applet from Javascript causes keyboard/focus problems

    Pretty sure there's a JRE bug here, but I'm posting to forums before I open one in case I'm missing something obvious :-)
    This issue may be specific to IE, I haven't tested elsewhere yet. Our web application is centered around a signed applet that is initialized with XML data via Javascript. We first noticed the problem when our users started upgrading from the 1.3.x plug-in to the 1.4.x plug-in. The major symptom was that shortcut keys stopped working. I debugged the problem off and on for about a month before I boiled it down to a very simple program that demonstrates the issue (included below). Basically, the program has a function that adds a JButton to a JPanel and registers a keyboard listener (using the new DefaultKeyboardFocusManager class) that prints a message to the console. This function is called by the applet's init() method, as well as by a public method that can be called from Javascript (called callMeFromJavascript()). I also included a very simple HTML file that provides a button that calls the callMeFromJavascript() method. You can test this out yourself: To recreate, compile the class below, JAR it up, sign the JAR, and put in the same dir with the HTML file. Load the HTML file in IE 5.0 or greater, and bring the console up in a window right next to it. Now click the button that says init--you should see the small box appear inside the button that indicates it has the focus. Now press some keys on your keyboard. You should see "KEY PRESSED!!!" appearing in the console. This is proper behavior. Now click the Init Applet from Javascript button. It has removed the button called init, and added one called "javascript". Press this button. Notice there is no focus occurring. Now press your keyboard. No keyboard events are registered.
    Where is gets interesting is that if you go back and make this an unsigned applet, and try it again, everything works fine. This bug only occurs if the applet is signed.
    Furthermore, if you try it in 1.3, signed or unsigned, it also works. So this is almost certainly a 1.4 bug.
    Anyone disagree? Better yet, anyone have a workaround? I've tried everything I could think of, including launching a thread from the init() method that sets up the components, and then just waits for the data to be set by Javascript. But it seems that ANY communication between the method called by Javascript and the code originating in init() corrupts something and we don't get keyboard events. This bug is killing my users who are very reliant on their shortcut keys for productivity, and we have a somewhat unique user interface that relies on Javascript for initialization. Any help or suggestions are appreciated.
    ================================================================
    Java Applet (Put it in a signed JAR called mainapplet.jar)
    ================================================================
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MainApplet extends JApplet implements KeyEventDispatcher
        JPanel test;
        public void init()
            System.out.println("init called");
            setUp("init");
        public void callMeFromJavascript()
            System.out.println("callMeFromJavascript called");
            setUp("javascript");
        private void setUp(String label)
            getContentPane().removeAll();
            test = new JPanel();
            getContentPane().add( test );
            JButton button = new JButton(label);
            test.add( button );
            test.updateUI();
            DefaultKeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this);
        public boolean dispatchKeyEvent(KeyEvent e)
            System.out.println("== KEY PRESSED!!! ==");
            return false;
    }================================================================
    HTML
    ================================================================
    <form>
    <APPLET code="MainApplet" archive="mainapplet.jar" align="baseline" id="blah"
         width="200" height="400">
         No Java 2 SDK, Standard Edition v 1.4.1 support for APPLET!!
    </APPLET>
    <p>
    <input type="button" onClick="document.blah.callMeFromJavascript();" value="Init Applet via Javascript">
    </form>

    I tried adding the requestFocus() line you suggested... Same behavior.
    A good thought, but as I mention in my description, the applet has no trouble gaining the focus initially (when init() is called). From what I have seen, it is only when the call stack has been touched by Javascript that I see problems. This is strange though: Your post gave me the idea of popping the whole panel into a JFrame... I tried it, and the keyboard/focus problem went away! It seems to happen only when the component hierarchy is descended from the JApplet's content pane. So that adds yet another variable: JRE 1.4 + Signed + Javascript + components descended from JApplet content pane.
    And yes, signed or unsigned DOES seem to make a difference. Don't ask me to explain why, but I have run this little applet through quite a few single variable tests (change one variable and see what happens). The same JAR that can't receive keyboard events when signed, works just fine unsigned. Trust me, I'm just as baffled as you are.

  • WebService call from signed applet and MS Vista

    Hi.
    I'M developing a system that needs to call web services from a signed applet.
    I have made the solution like this.
    The applet starts by checking that the 12 needed libs is present under the <java home>\lib\ext folder. if not it will download the files automatically and restart the browser.
    This works fine in Windows XP because the signed applet gives me read/write access to the whole machine, but in Vista this isn't possible anymore (as i understand it).
    My question: Is it possible to put these libs in another folder that the ext lib? I have tried to define the "archive" tag in my Object tag but i get the class not found exception thrown in my face.
    If there is a solution to this i would very much like some pointers!
    If not what can i do to get access to the <java home>\lib\ext folder under Vista?
    Regards
    Michael Pallesen

    When invokin applet methods via javascript, you are accessing privileged actions from an unsafe source.
    Depending on your needs, you could either load the system variables in applet init into class variables and return the information contained in the class variables to javascript or wrap the method calls inside AccessController.doPrivileged() calls.

  • Signed Applet and native code

    Hi all,
    I have an application which I deploy with webstart and includes native code. This all works perfectly with webstart. I now want to deploy it as an applet. This works accept for the native code. I have done heaps of searching and cannot determine the most appropriate way to make the native code visible to the applet.
    Ultimately I am at the point where i recieve a UnsatisfiedLinkError when calling loadLibrary(...) for the native code. Currently i have the native code (dll's for windows, so's for Solaris etc) in independent jars which are also signed (as needed for webstart).
    Could anyone give me some advise or a reference to more info on this topic.
    I am using Java 1.5 and am happy to use 1.6 if neccessary.
    Thanks,
    Dave

    Andrew - of course you were correct about the signed cert - I misspoke when the CA signed applet didn't show a warning. (You were also right that I must have checked 'always accept' the certificate on the server I had the CA signed cert on).
    I think you guys are on to something about the privileged actions. It would explain where one popup has the icon and the other doesn't. We have Javascript making calls into the applet and we do use JNI (although I don't think there are any calls back). We do wrap these calls in privileged actions but maybe we missed something. What I've seen before is a security exception is thrown if we don't wrap them - but maybe there are areas where we don't and it doesn't throw an exception or it does and we eat it somehow (and for whatever reason doesn't cause anything noticeable).
    Now that I know it could likely be the applet code and not necessarily a build issue with signing the jars, I have another place to look...
    I'll check it out and let you know what I find.

  • Problem with a signed applet and a user machine.

    Hello. I´m having some problems with a signed applet with some dependences.
    In one particular computer the applet doesn´t load.
    The java version installed in that computer is 1.6.0_25.
    The invocation tag:
    <applet name=applet id="applet" code=Applet/RequestApplet.class width=155 height=21 archive="RequestApplet.jar " MAYSCRIPT>
       <param id="parametro1" name="usuario" value="<Computed Value>">
    </applet>The RequestApplet.jar and dependences:
       bcmail-jdk13-145.jar(signed by bouncy castle), jce-ext-jdk13-145.jar(signed by bouncy castle), AbsoluteLayout.jar, plugin.jar, RequestApplet.jar(signed by me)*this files are all in the same folder.
    The requestApplet.jar manifest:
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.1
    X-COMMENT: Main-Class will be added automatically by build
    Class-Path: bcmail-jdk13-145.jar jce-ext-jdk13-145.jar plugin.jar Abso
    luteLayout.jar
    Created-By: 10.0-b23 (Sun Microsystems Inc.)
    Main-Class: Applet.RequestApplet
    Name: Applet/ResponseApplet$1.class
    SHA1-Digest: fO5IPiwEH3OhvlprhBecmMIAVJI=
    Name: Applet/NewJApplet.class
    SHA1-Digest: 6XSpm7lQEQRi39TegoUYv2aFJrk=
    Name: Applet/ResponseApplet.class
    SHA1-Digest: v1EbKUFB+QdvO05xx8UzAMNIyRs=
    Name: Applet/ResponseApplet$4.class
    SHA1-Digest: XH4I67psXZTelpz0AMAYc/Ej8QY=
    Name: Applet/RequestApplet$1.class
    SHA1-Digest: KAP5sAC4Thv/6GClkFAdGUVzgYA=
    Name: Applet/ResponseApplet$5.class
    SHA1-Digest: CVPnKrW2SgNEkRzYnVnQe3KGrIU=
    Name: Applet/ResponseApplet$3.class
    SHA1-Digest: SjfW1k1K7BA9m3AxmHi+jvRE+9o=
    Name: Applet/ResponseApplet$2.class
    SHA1-Digest: 3Pu18CZMLuEh7/n3y7XxFSkuNQY=
    Name: Applet/RequestApplet.class
    SHA1-Digest: Tky85es5+o371adetH9XVEI2Z+o=The error:
    java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider
         at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.NoClassDefFoundError: org/bouncycastle/jce/provider/BouncyCastleProvider
         at java.lang.Class.getDeclaredConstructors0(Native Method)
         at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
         at java.lang.Class.getConstructor0(Unknown Source)
         at java.lang.Class.newInstance0(Unknown Source)
         at java.lang.Class.newInstance(Unknown Source)
         at sun.plugin2.applet.Plugin2Manager$12.run(Unknown Source)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
         at java.awt.EventQueue.access$000(Unknown Source)
         at java.awt.EventQueue$1.run(Unknown Source)
         at java.awt.EventQueue$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider
         at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         ... 20 more

    Thanks. I´ll try with your tips. But if i put all the dependences in archive I get this error.
    The tag:
    <applet name=applet id="applet" CODEBASE="." code="Applet/RequestApplet.class" width=155 height=21 archive="bcmail-jdk13-145.jar, jce-ext-jdk13-145.jar, AbsoluteLayout.jar, plugin.jar, RequestApplet.jar " MAYSCRIPT>
       <param id="parametro1" name="usuario" value="<Computed Value>">
    </applet>The error:
    Java Plug-in 1.6.0_25
    Usar versión JRE 1.6.0_25-b06 Java HotSpot(TM) Client VM
    Directorio local del usuario = C:\Documents and Settings\Administrator
    c:   borrar ventana de consola
    f:   finalizar objetos en la cola de finalización
    g:   liberación de recursos
    h:   presentar este mensaje de ayuda
    l:   volcar lista del cargador de clases
    m:   imprimir sintaxis de memoria
    o:   activar registro
    q:   ocultar consola
    r:   recargar configuración de norma
    s:   volcar propiedades del sistema y de despliegue
    t:   volcar lista de subprocesos
    v:   volcar pila de subprocesos
    x:   borrar antememoria del cargador de clases
    0-5: establecer nivel de rastreo en <n>
    basic: Receptor de progreso agregado: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@f39b3a
    basic: Plugin2ClassLoader.addURL parent called for http://desarrollo.isaltda.com.uy/CertReq.nsf/bcmail-jdk13-145.jar
    basic: Plugin2ClassLoader.addURL parent called for http://desarrollo.isaltda.com.uy/CertReq.nsf/jce-ext-jdk13-145.jar
    basic: Plugin2ClassLoader.addURL parent called for http://desarrollo.isaltda.com.uy/CertReq.nsf/AbsoluteLayout.jar
    basic: Plugin2ClassLoader.addURL parent called for http://desarrollo.isaltda.com.uy/CertReq.nsf/plugin.jar
    basic: Plugin2ClassLoader.addURL parent called for http://desarrollo.isaltda.com.uy/CertReq.nsf/RequestApplet.jar

  • Signed applets and dialogs

    hi all,
    question to clarify my understanding of signed applets.
    got a bog-standard applet. nothing clever or special.
    got myself a bog-standard cert from thawte.
    signed the applet and put it on a webserver.
    displays the correct security notice on first load. continue and "Always trust this company" etc...
    all runs fine.
    in the applet init, i've put in
    java.awt.AWTPermission perm = new java.awt.AWTPermission("showWindowWithoutWarningBanner");
    try {
      AccessController.checkPermission(perm);
      System.out.println("access allowed?");
    } catch (AccessControlException ex) {
      ex.printStackTrace();
    }open the main frame, and all is good. no banner or access denied exception.
    show a popup menu, or tooltip. no banner.
    display a dialog. oops, a banner "Java Applet Window" and the bottom section of the dialog is covered with the warning msg.
    so i'm confused.
    does this mean that this permission does not apply to dialogs? (if so, what?)
    even with a cert, this msg cannot be removed? (please tell me no)
    wrap and recode all dialog openings with AccessController.doPrivileged? (i dont wanna do this)
    or i missed something with the setup.
    i've been searching the forums for some info, but seem to be going in circles. editing the policy file on all client comps is not a valid option, unless there is sometrick i dont know about .
    tia
    -a

    hi,
    i got the answer from the link
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1215-security.html

  • Swing Applets and javascript

    I'm writing a swing applet to do some rich text editing, mainly bolding, italicizing, etc as well as support for special characters (greek letters, etc). Rather than using the HTMLEditor kit (which I've heard suspect things about), I am going through the document tree and creating a corresponding HTML version of the string (inserting HTML entities based on position in the document). I am planning on exposing these to the client via javascript, but I have run into some problems with document.applets.appletName.publicMethodName. I've gotten this to work on IE for the PC. I am aware that there are some issues with the Sun plug-in for Netscape on PC. An additional complication is that this needs to work on a Macintosh as well. Does anyone know if the MRJ plugin supports this behavior (for both IE and Netscape)? Is there a better way to go about doing this, rather than using javascript to expose the HTMLized version of the string? Thanks in advance.
    Tim

    You must to check if the mrj plug-in is the same version to the jre1.3, because the jre 1.3 supports the javascript events. other way is incorporate in your applet the javascript class, in the next web page you will find the js.jar http://www.mozilla.org/rhino/download/
    if you have troubles write me to
    [email protected]
    good luck
    Carlos Sanhueza
    Santiago de Chile

  • Signed Applets And IE Security

    Hi, all!
    I have a signed applet (x.509) run in IE with plug-in 1.4.0b92. In most cases the behavior is as it is expected - a window prompting user to deny, allow or always alow the certificate in the applet appears. But there are some cases when this window doesn't appear and the users are able to run the applet. No certificates are previously installed or granted(at least there aren't any items in Certificates tab or in .keystore file in user home).
    Does anybody could say what is the normal behavior of the plug-in - does it always prompt the user when a signed content is run; does it depend on Security setting in the browser?
    Thanks in advance for any help or further information!
    Regards, Ivo Kolev

    Hi,
    Do you clear you Plug-in Cache explicity ?
    May be sometimes your IE uses the plug in to restore the applet from the cache.
    But I remember having observed the same problem when I used a signed applet. The dialog box appears 'mostly always' but sometimes it just doesnt :)
    if you are able to resolve the problem...let me know

  • How to create signed applet and make it work with browser

    i hav an applet that needs to write a file to onto local system resource. i came to know that the applet needs to be signed. so i searched some guides to create a signed applet but most of them specify how to use it with applet viewer and not on a browser. plz help me with how to sign an applet and and allow it to write a file from within a browser.

    On linux, something like this:
    keytool -genkey -alias signSocket -keystore socketstore -keypass abc123 -dname "cn=your name" -storepass abc123
    jar cvf Socket.jar *.class
    jarsigner -keystore socketstore -storepass abc123 -keypass abc123 -signedjar SSocket.jar Socket.jar signSocket
    And in html:
    CODE = "YourClass.class"
    ARCHIVE = "SSocket.jar"
    ...

Maybe you are looking for

  • Partner profile in case of Idoc to File scenario

    Hi I have ECC system and PI system. Scenario as : ECC will send the Idoc to PI ..PI system will Convert this to flat file and provide it to Legarcy system I made Partner profile in sending system (ECC) and maintained Message type 'MATMAS' as Outbound

  • Authentication failed to....

    I have a strange problem with which I'm hoping someone can assist me. I have 8 clients running Leopard. These clients are all at different locations behind routers that use NAT to forward incoming traffic on the public static IP address to the privat

  • Accessing Flash in a portlet

    hi all, I need to acess a flash file in a portlet.I am able to do that using <iframe> tag in mine .aspx . Is this possible to add flash file in other way. can i access .swf file directly from a portlet. regards Vineet

  • Thumbnail size when uploading pics to Websites

    Ok, I've asked this question on several sites with no luck and getting a little frustrated. When attempting to load photos from file on my local harddrive to facebook, 500px, flickr, email, etc. the the thumbnails are fixed in size. The option to enl

  • Digital Out Sample Clock Sources

    Hey guys, I am putting together an application <attached>. Currently I have the ai/sampleclock wired to its timing VI.  When I run this with highlighting on, it just goes to the read for the digital in task and waits there like it has not yet acquire