How to Intergrate Policy with applet

hi my name is easan. I created an applet which reads and writes to a file but i had problems accessing the file. I solved that by granting read and write permission to the file by creating a policy. I can run the applet in the appletviewer using this line
c:\>appletviewer -J-Djava.security.policy=<policyname> applet.html
I would like to know hw to intergrate this policy with my applet so that i can run my applet from a browser.
I would appreciated any help from anyone..... thank you in advance.
Easan

It's not possible to integrate policy file together with applet. If you want to perform these dangerous operation (read,write) from applet, you have to sign applet's jar file. And in applet's code you have to use AccessController.doPrivileged(PrivilegedAction action) for possibly unsafe parts of code.
tina

Similar Messages

  • How to use dll with applet?

    I want to use a dll with a applet.
    I try several solutions : signed applet, dll in jar, ... But without any result.

    U can use it if u sign the applet. It is a bit trick way though.
    Create an inputstream, read and copy the dll to some where path is defined (System dir for ex) from jar. Then load that library.. But u need a dummy class for that before starting applet. Rest is ur brain.. Best of luck. I tried and succeded.

  • How to intergrate OBIEE with EBS

    Hello all,
    How can i integrate OBIEE with EBS?
    I want to run a concurrent program in EBS which generates .xml file and i want to use this .xml file in OBIEE and generate .pdf file.
    So is there any way that i can automate this process.
    Thank you,
    Madhu

    Hi,
    It is possible. Please refer to the following documents for details.
    Note: 216212.1 - Business Continuity for Oracle Applications Release 11i, Database Releases 9i and 10g
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=216212.1
    Note: 452056.1 - Business Continuity for Oracle Applications Release 12 on Database Release 10gR2 - Single Instance and RAC
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=452056.1
    Regards,
    Hussein

  • How to connect DB with applet

    hi, all
    I am use Mysql as my DB, but when I my program as window application, it is work, but when I run it as Applet, it won't work, can any one tell me how to access the data from DB to Applet?
    public class AppletApp extends JApplet {
    public void init() {
         DefaultMutableTreeNode root = new DefaultMutableTreeNode("root");
         try
               Class.forName("org.gjt.mm.mysql.Driver");
                catch(Exception e)
                     System.out.println(e.toString());
                  Connection cn;
                  Statement st;
                  ResultSet rs ;
              try
                     cn = DriverManager.getConnection("jdbc:mysql://localhost:3306/cti", "root", "123");
                    st  =cn.createStatement();
                    rs = st.executeQuery("select name from parent");
              while (rs.next())
                   //System.out.println(rs.getString("name"));
                   DefaultMutableTreeNode NewNode = new DefaultMutableTreeNode(rs.getString("name"));
                   root.add(NewNode);                              
              rs.close();
              st.close();
              cn.close();
                }catch(SQLException se)
              System.out.println(se.toString());
         /*DefaultMutableTreeNode node1 = new DefaultMutableTreeNode("node1");
         root.add(node1);
         node1.add(new DefaultMutableTreeNode("sub1_1"));
         node1.add(new DefaultMutableTreeNode("sub1_2"));
         setSize(400, 400);*/
         getContentPane().add(new JTree(root));     
    public static void main(String arg[]) {
         JFrame myFrame = new JFrame();
         Container contentPane = myFrame.getContentPane();
         contentPane.setLayout(new GridLayout(1,2));
         AppletApp app = new AppletApp();
         contentPane.add(app, BorderLayout.CENTER);
         app.init();
         app.start();
         myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);               
         myFrame.setSize (600,600);
         myFrame.setVisible(true);
    }

    I had signed the applet and there is a .jar file, but when I type
    AppletViewer tree.html
    there are still an sercuity error come out, so thing else I need to do?
    am I need to modifty the html file? right now my html file resource code are look like this:
    <html>
    <applet code = x.class heigh = 300 width = 300>
    </applet>
    </html>

  • How to deploy jfxpanel with applet to Tomcat.....

    I want to deploy jfxpanel with in a panel in applet. But a message appear that jfxpanel class not found. when i include the jar file jfxrt.jar, tomcat isn't loaded this file. After that i use the environment varibale and set the class path in javafx runtime lib. but still unable the same exception appeared. I want your help to solve this issue..

    Thank you igor. Your reply resolve most of the issues.. of my application. when i installed javafx runtime alone . the application link http://javafx.com/about-javafx/ that you have given me works fine but it changes the jre or something else... that my own developed application not able to make connection with the tomcat server. when i reinstalled jdk6u29 my application works fine and the link above is not working.
    After that without installing the runtime of javafx 2.0 i install the javafx sdk 2.0.1 the runtime installed by itself. but the same link throws the same exception the exception as after launching my own client application.
    java.lang.RuntimeException: java.lang.NoClassDefFoundError: javafx/embed/swing/JFXPanel
         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: javafx/embed/swing/JFXPanel
         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: javafx.embed.swing.JFXPanel
         at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(Unknown Source)
         at sun.plugin2.applet.JNLP2ClassLoader.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
    Exception: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javafx/embed/swing/JFXPanel
    After installing the runtime of javafx again the link worked successfully and my client application application didn't able to make connection with tomcat.
    is there any way to merge jre with javafx runtime. and with loading of jre , javafx runtime loaded by itself.????

  • How to Intergrate Flex with RAD7 or RAD7.5 ? urgent plz......

    Hi all,
           I want to use flex plugin with RAD7 or RAD 7.5 is there any way to integrate RAD with flex....please suggest me any link or procedure to integrate .
    and is there any compiling issues will occur while building the code?
    thanks
    -Balu

    assuming installing flex builder plugin and use rads eclipse for it did not work ?
    option :
    turn on Clasic Update from properties --> general--> capabilities
    then you will see another software update under Help which will have anotehr submenu, (I think its called manage components ) or something like that
    in there you can manually link flex builder plugin to Rad by clicking add exstension.

  • How to include ojdbc.jar with applet in apex

    Hi,
    I am integrating applet with apex. I need to use ojdbc.jar to connect to Database. How can i include this jar. I tried uploading it as a static file. But i am not sure how to embed it with applet code in region source of a page. I am using following code to embed the applet.
    <applet code="TestApplet.class" archive="#APP_IMAGES#Test.jar" width="500" height="500">
    </applet>
    Please suggest how to include the ojdbc.jar.
    Regards,
    Shweta

    Thank you all for help, from your posts I was able to get the datepicker working with a different version of jQuery (but not jQueryUI) included on the page. There are two methods:
    1. Include the new library before #HEAD# and change the reference to a different variable, for example:
    <script src="jquery-1.6.4.min.js" type="text/javascript"></script>
    <script type="text/javascript">
      var jq164 = jQuery;
    </script>
    #HEAD#2. Include the new library after #HEAD# and enable noConflict() mode, for example:
    #HEAD#
    <script src="jquery-1.6.4.min.js" type="text/javascript"></script>
    <script type="text/javascript">
      var jq164 = jQuery.noConflict(true);
    </script>In both examples above, $, jQuery and apex.jQuery point to apex jQuery, while jq164 points to the new one.
    However, I couldn't manage to include a newer version of jQueryUI. I only found a page ([url http://stackoverflow.com/questions/6358961/using-multiple-jquery-ui-versions]http://stackoverflow.com/questions/6358961/using-multiple-jquery-ui-versions) that says you have to specify a different context for each version of jQueryUI included on the same page. I haven't yet had time to look at this, so if anyone already knows how to do it, it would be really nice to share it with us.
    Regards,
    Jure

  • How to restrict users working on Windows 7 clients from accessing Windows Explorer and other systems in the network through Group Policy with a domain controller running on Windows Server 2008 r2

    Dear All,
    We are having an infrastructure setup of around 500 client computers managed through group policy.
    Recently the domain controllers have been migrated from Windows Server 2003 to Server 2008 R2.
    Since this account requires extremely strict environment, we need to figure the solution for restricting the users from access anything locally.
    It would be great if you can assist me with the following query.
    How to restrict users logged on Windows 7 clients from accessing Windows Explorer and browsing other systems in the network through Group Policy with a domain controller running on Windows Server 2008 r2 ?
    Can we disable Network Tab on the left hand pane ?
    explorer.exe is blocked already, but users are able to enter the Windows Explorer by clicking on the name which is visible on the Start Menu.

    >   * explorer.exe is blocked already, but users are able to enter the
    >     Windows Explorer by clicking on the name which is visible on the
    >     Start Menu.
    You cannot block explorer.exe when you do not replace the shell - the
    desktop you see effectively IS explorer.exe...
    Your requirement sounds like you need a custom shell:
    http://gpsearch.azurewebsites.net/#2812
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • How to run java signed applet in vista with changing IE security options

    how to run java signed applet in vista with changing IE security options. If i change the IE security settings to low. it works.
    without changing the security setting, how to run.

    j_nanaji9 wrote:
    how to run java signed applet in vista with changing IE security options. If i change the IE security settings to low. it works.
    without changing the security setting, how to run.Can't be done without changing the security setting.

  • How does QoS work with WAAS WCCP? What's the interaction between QoS Traffic Classification and WAE Traffic Application Policy?

    How does QoS work with WAAS WCCP? What's the interaction between Router QoS Traffic Classification and WAE Traffic Application Policy?

    By default, WAAS preserves the DSCP marking on intercepted packets.  There is a configuration option to set/override the DSCP value at the global (device), application, and classifier levels.  Currently WAAS provides marking only.  There is no action taken by WAAS based on the DSCP value.
    Regards,
    Zach

  • How to interect with applet within browser

    i want to write a jws that can interact with the applet (inside browser)
    sample:
    i write a caculator, all the class are in jlnp(jws) except the interface,
    user only can access and see the interface(applet) when he/she come to my website. (ofcouse ,i just wan to promote my ad).
    so, can give me some hint how to interact jws and applet that within browser,
    like jws to

    Hi
    If your database is oracle 9i you connect to database throgh isqlplus.During the installation of database it diplays http server with port number.Check the port number with 7778
    ExmPLE : HTTP://MACHINENAME:7778/ISQLPLUS
    Regards
    Mohan

  • How i replace default password policy with my custom password policy

    Hi All,
    can anybody help me to replace idm default password policy with my custom password policy?

    1. Go to Security --> Policies
    2. New --> String Quality Policy --> define rules --> save
    3. New --> Identity System account policy --> define rules and set the policy created in step2 to for password policy --> save
    4. Assign the policy created in step 3 to the user
    a. when create a user, under the 'Security' tab , for the 'Account policy' select the policy created in step
    b. Programattically, create /check out user view, assign the step 3 policy
    <set name='user.waveset.assignedLhPolicy'>
    <s>step 3 policy</s>
    </set>
    and checkin the view

  • Use XML Digital Signature(Apache XML security) with Applet

    I have problem when I use xml-security-1_2_1 library from Apache with applet and access denied errors occur.
    6 May 2005 10:06:45 org.apache.xml.security.Init init
    SEVERE: Bad:
    java.security.AccessControlException: access denied (java.util.PropertyPermission org.apache.xml.security.resource.config read)
    bla bla....
    How should I do ? Please! T_T and thank you ..

    An applet cannot read the local file system, connect to any other computer than the one
    it came from or read properties it's not supposed to read. And I think it cannot write to any
    property.
    If you sign the applet or set up a policy for it the applet can do the same as an application
    allthough the jre will still check the stack trace if the entire stack has the same privileges
    as you signed applet.
    http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
    second post and last post for the java class file

  • Database Connection with applet

    my code is:
    public class Test extends JApplet implements ActionListener,ItemListener{
    public void init(){
                   Connection con=null;
                             Statement st=null;
                             try{
                                            Class.forName("oracle.jdbc.driver.OracleDriver");
                                            con=DriverManager.getConnection("jdbc:oracle:thin:@192.9.200.10:1521:FBIC","FBICEXT","FBICEXT");//"jdbc:odbc:FBIC","FBICEXT","FBICEXT"
                                            st=con.createStatement();
                                            String attSelect= "select GRP_CODE,GRP_NAMS from T_GRP";
                                            ResultSet rs= st.executeQuery(attSelect);
                                       while(rs.next())
                                            String Grpcode=     rs.getString(1).trim();
                                            String GrpName=rs.getString(2).trim();
                                            System.out.println(Grpcode+""+GrpName);               
                                       }catch(Exception e)
                                            System.out.println("Database Exception:"+e);
    i copied classess111.jar file into classpath in Eclipse and i copied same .jar file into package where applet classes exists.
    but it is giving following exception:
    Database Exception:java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    when i copy same code in normal class ,it is working fine
    could u please tell me where i should put this .jar file for drivers

    i found in http://forum.java.sun.com/thread.jspa?threadID=641300&tstart=100 thread with same problem,after creating policy file she solved his problem.
    how to create policy file and where it should it keep

  • Using policy with html code

    I have created policy for permissions for the applet to comunicate over sockets...how to get it to access that policy file from inside the html code
    example html
    <center><applet code="CBJGUI.class" width="675" height="510"></center>
    </applet>
    example cmnd line to load with policy thru applet viewer
    appletviewer -J-Djava.security.policy=CBJper CBJv.1.0.htm
    please help....so close I can smell it

    I have exactly the same doubt.
    I read somewhere that you might need to change the java.security file in the {java installation}/jre/lib/ file. I added the grant permission lines to it too. Still it doesnt work.
    If i run the same application by passing the security policy thru the command line and run the applet thru appletviewer then the same application works.
    How to get it to work through the browser though?
    Please reply soon.

Maybe you are looking for

  • Windows 8.1 Apps open and close immediately

    We have joined a laptop running Windows 8 to the domain however none of the apps work. They open and then close immediately. The error in the event log is:The app microsoft.windowscommunicationsapps_8wekyb3d8bbwe!Microsoft.WindowsLive.Calendar's pack

  • Automatic inbound delivery creation.

    Hi All In our STO process, when the outbound delivery is created from the issuing plant it should automatically create inbound delivery in the receiving plant. I think it is happening by triggering output type SPED. In some cases for the same STO we

  • PDF file generated through PDFWriter does not open

    i generate a pdf file using itext "itext-1.4.6.jar". this file opens in Acrobat reader 5,6,7. But i can not open it in Acrobat Reader 8. Plz tell me if there is some special reason associated with itext or Acrobat Reader.

  • CUCM Version 9.X generate alerts every day

    Hi To all I receive everyday alerts that two nodes from the cluster are down ServerDown occurred. Node 10.10.1.1 is unreachable.  ServerDown occurred. Node 10.10.1.2 is unreachable. We have a cluster of four cucms First ucs server located to the buil

  • New source system - same BI system - time estimate

    Hello, The project management of my current project has decided to create a new ECC QA system as copy from existing ECC QA with no data. The BI QA system will remain as it is. How much work will this create for us in order to re-map the transfer stru