Dynamic code downloading

Could java interpreter execute ANY classes /or maybe automatically download it first/ remotely from network via HTTP, and not only from local disk? If yes, how this could be done?

You could certainly download code dynamically, compile and run it with java. There's no problem there.

Similar Messages

  • Dynamic code downloading using RMI

    Hi,
    Can somebody please explain what are the nesesary steps to set up a class server.
    I have made a ClassServer.
    It is running...
    Another RMI server is running on this machine which has method to return object of an Interface
    Client code has an instruction - System.setProperty("java.rmi.server.codebase", "http://127.0.0.1:2020");
    When this client requests Interfeace from server I get following exception
    $ java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
            java.lang.ClassNotFoundException: com.rasa.interface.InterfaceImpl1
    java.lang.ClassNotFoundException: com.rasa.interface.InterfaceImpl1
            at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
            at java.lang.Class.forName0(Native Method)
            at java.lang.Class.forName(Class.java:195)
            at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:367)
            at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:88)
            at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:145)
            at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:918)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
            at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
            at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
            at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:300)
            at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:134)
            at com.rasa.server.MainServer_Stub.getInterface(Unknown Source)
            at com.rasa.client.ProgramImpl.run(Unknown Source)can someone please explain why this is happning.
    note Interface implementation also implements Serializable
    Thank you

    sorry I thought you were trying to download the stubs
    only...
    try this:
    http://java.sun.com/j2se/1.4.1/docs/guide/rmi/codebase.
    tmlyes followed everystep from there, but no luck

  • JMX/RMI and Automatic Code Downloading

    There is a brief discussion of automatic code downloading in the JMX Best Practices document (http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/best-practices.jsp#mozTocId348704), but not enough to actually implement it.
    Would someone be kind enough to point me to some documentation on the subject, and/or maybe provide a few pointers?
    Thanks!
    Steve

    Hi Steve,
    If you want to know more about RMI dynamic code downloading have a look at the following link:
    http://download.java.net/jdk6/docs/technotes/guides/rmi/codebase.html
    You should also know that you can supply a ClassLoader to both the JMXConnectorServer and JMXConnector at instantiation time in the environment map. This ClassLoader will be used by the JMX connectors to serialize/deserialize the method parameters and return values when getting and setting attributes, or invoking operations on a given MBean.
    If you want to know more about how classloading works within the JMX connectors have a look at Chapter 13 "Connectors" in the JMX 1.4 specification:
    http://download.java.net/jdk6/docs/technotes/guides/jmx/JMX_1_4_specification.pdf
    Regards,
    Luis-Miguel Alventosa
    JMX Java SE development team
    Sun Microsystems, Inc.

  • Dynamic Class Downloading difficulty

    Hi RMI Specialists,
    I am experiencing a possible dynamic class loading issue when attempting to separate the client & server codes across 2 separate Windows (XP & 2000) systems. This exercise (from ch13 of Oreilly�s Learning Java) is made up
    of the following interfaces and classes:
    On the Server side:
    package LearningJavaServer;
    import java.rmi.*;
    import java.util.*;
    public interface RemoteServer extends Remote {
        Date getDate(  ) throws RemoteException;
        Object execute( WorkRequest work ) throws RemoteException;
    package LearningJavaServer;
    import java.rmi.*;
    import java.util.*;
    public class MyServer extends java.rmi.server.UnicastRemoteObject
        implements RemoteServer {
        public MyServer(  ) throws RemoteException { }
        // implement the RemoteServer interface
        public Date getDate(  ) throws RemoteException {
            return new Date(  );
        public Object execute( WorkRequest work ) throws RemoteException {
            return work.execute(  );
        public static void main(String args[]) {
            try {
                RemoteServer server = new MyServer(  );
                Naming.rebind("NiftyServer", server);
            } catch (java.io.IOException e) {
                // problem registering server
    package LearningJavaServer;
    import java.io.*;
    public class Request implements java.io.Serializable {}
    package LearningJavaServer;
    public abstract class WorkRequest extends Request {
        public abstract Object execute(  );
    }On the Client side:
    package LearningJavaClient;
    import java.rmi.*;
    import java.rmi.registry.LocateRegistry;
    import java.rmi.registry.Registry;
    public class MyClient {
        public static void main(String [] args)
          throws RemoteException {
            new MyClient( args[0] );
        public MyClient(String host) {
            try {
                RemoteServer server = (RemoteServer)
                    Naming.lookup("rmi://"+host+"/NiftyServer");
                System.out.println( server.getDate(  ) );
                System.out.println(
                  server.execute( new MyCalculation(2) ) );
            } catch (java.io.IOException e) {
                  // I/O Error or bad URL
                     System.out.println( e );
            } catch (NotBoundException e) {
                  // NiftyServer isn't registered
               System.out.println( e );
    package LearningJavaClient;
    import java.rmi.*;
    import java.util.*;
    public interface RemoteServer extends Remote {
        Date getDate(  ) throws RemoteException;
        Object execute( WorkRequest work ) throws RemoteException;
    package LearningJavaClient;
    public class MyCalculation extends WorkRequest {
        int n;
        public MyCalculation( int n ) {
            this.n = n;
        public Object execute(  ) {
            return new Integer( n * n );
    package LearningJavaClient;
    import java.io.*;
    public class Request implements java.io.Serializable {}
    package LearningJavaClient;
    public abstract class WorkRequest extends Request {
        public abstract Object execute(  );
    }Steps to invoke all services on the server side:
    cd C:\Documents and Settings\htran\JavaRMI\build\classes on both systems;
    ( i ) start rmiregistry.
    ( ii ) java -Djava.rmi.server.codebase='http://serverhostname/LearningJavaServer/' -Djava.security.policy="C:\Documents and Settings\htran\.java.policy" -cp . LearningJavaServer.MyServer
    Steps to invoke all services on the client side:
    ( i ) java -Djava.security.policy="C:\Documents and Settings\htran\.java.policy" -cp . LearningJavaClient.MyClient serverhostname
    java.rmi.NotBoundException: NiftyServer
    Or
    ( ii ) java -Djava.rmi.server.codebase='http://clienthostname/LearningJavaClient/' -Djava.security.policy="C:\Documents and Settings\htran\.java.policy" -cp . LearningJavaClient.MyClient serverhostname
    java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
    java.net.MalformedURLException: no protocol: 'http://clienthostname/LearningJavaClient/'
    Is it possible that this issue could have been caused by either the Request/WorkRequest classes which are present on both system? Likewise, is the location of invoking RMI registry on the server correct?
    Both systems have got their own web servers (http://serverhostname/LearningJavaServer & http://clienthostname/LearningJavaClient).
    No firewalls between the two systems and the security files (C:\Document Settings\htran\.java.policy) are made up of the following 2 lines:
        grant codeBase "file:/home/jones/src/" {
            permission java.security.AllPermission;
        };Another issue that I am having is that the server process below is that it keeps on dropping off after a minute or two:
    C:\Documents and Settings\htran\JavaRMI\build\classes>java -Djava.rmi.se
    rver.codebase='http://clienthostname/LearningJavaClient/' -Djava.security.policy="C:\
    Documents and Settings\htran\.java.policy" -cp . LearningJavaClient.MyClient serverhostname
    This exercise has worked fine when running all the codes on the same host.
    I am running Netbeans 5.5, JDK1.5.0_11 on Windows 2000 (Server) & XP (Client).
    Any assistance would be appreciated.
    Many thanks,
    Henry

    Hi Esmond,
    You still have an empty catch block for the IOException. Fix that first. I >can't possibly tell what's going on until you can at least bind the >service.OK. MyServer.java below no longer throws RemoteExceptions in both of its methods and added the print stacktrace to catch the empty IOException earlier.
    public class MyServer extends java.rmi.server.UnicastRemoteObject
        implements RemoteServer {
        public MyServer(  ) throws RemoteException { }
        public Date getDate(  ) {
            return new Date(  );
        public Object execute( WorkRequest work ) {
            return work.execute(  );
        public static void main(String args[]) {
            System.setSecurityManager(new RMISecurityManager());
            try {
                RemoteServer server = new MyServer(  );
                Naming.rebind("NiftyServer", server);
            } catch (java.io.IOException e) {
                // problem registering server
               System.out.println("IOexception from MyServer");
                e.printStackTrace();
            } catch (Exception e) {
                System.out.println("General Exception from MyServer");
                e.printStackTrace();
    }The following error messages were produced when launching MyServer.class. I have broken it into 2 separate attempts. One with Dynamic Class Downloading & one without.
    Use CodeBase when launches MyServer.
    C:\Documents and Settings\abc\JavaRMI\build\classes>java -Djava.rmi.server.codebase='http://clienthostname/LearningJava/' -Djava.security.policy="C:\Documents and
    Settings\abc\.java.policy" -cp . LearningJava.MyServer
    IOexception from MyServer
    java.rmi.UnmarshalException: Error unmarshaling return; nested exception is: java.net.MalformedURLException: no protocol: 'http://clienthostname/LearningJava/'
    at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
    at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
    at java.rmi.Naming.rebind(Unknown Source)
    at LearningJava.MyServer.main(MyServer.java:28)
    Caused by: java.net.MalformedURLException: no protocol: 'http://clienthostname/LearningJava/'
    at java.net.URL.<init>(Unknown Source)
    at java.net.URL.<init>(Unknown Source)
    at java.net.URL.<init>(Unknown Source)
    at sun.rmi.server.LoaderHandler.pathToURLs(Unknown Source)
    at sun.rmi.server.LoaderHandler.getDefaultCodebaseURLs(Unknown Source)
    at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
    at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
    at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
    at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
    at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
    at java.io.ObjectInputStream.readClassDesc(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    ... 5 more
    Does NOT use CodeBase when launches MyServer
    C:\Documents and Settings\abc\JavaRMI\build\classes>java -Djava.security.policy="C:\Documents and Settings\abc\.java.policy" -cp . LearningJava.MyServer
    IOexception from MyServer
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: LearningJava.RemoteServer
    at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:385)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
    at sun.rmi.transport.Transport$1.run(Transport.java:153)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
    at java.lang.Thread.run(Thread.java:595)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
    at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
    at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
    at java.rmi.Naming.rebind(Unknown Source)
    at LearningJava.MyServer.main(MyServer.java:28)
    Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
    java.lang.ClassNotFoundException: LearningJava.RemoteServer
    at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
    at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:375
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
    at sun.rmi.transport.Transport$1.run(Transport.java:153)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:707)
    at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.ClassNotFoundException: LearningJava.RemoteServer
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:242)
    at sun.rmi.server.LoaderHandler.loadProxyInterfaces(LoaderHandler.java:707)
    at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:651)
    at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:588)
    at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:628)
    at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:294
    at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:238)
    at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1500)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1463)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
    ... 9 more
    I now understand that you do want to use dynamic class loading, and >moreover that you want to do it from the client to the server, in which >case you do need java.rmi.server.codebase at the client and you do >also need a codebase server. However the client and server can both >use the same codebase server, and indeed in this situation I don't >see why the server needs a codebase server or setting at all actually. I >don't really see why you want to use it from the client either, if this is a >closed system but that's your problem not mine.I now use only one codebase server. ie the one on the Client side where MyCalculation.class resides. You are right it is not necessary to use codebase when launching MyServer since the Client side does not need to download any additional classes over to the client side. Nevertheless, neither of the above startups (with/without) codebase worked even though the error messages were slightly different.
    Btw, can you explain what you mean by a "close system" compared to an "opened system"?
    java.net.MalformedURLException: no >protocol: 'http://clienthostname/LearningJava/'
    That doesn't make sense. Are you sure you're transcribing it correctly? >Also what line of code is throwing it?Here is the code for MyClient which explains that the line java.net.MalformedURLException: came from line 32, the printStackTrace() from IOException.
    public class MyClient {
        public static void main(String [] args)
          throws RemoteException {
          System.setSecurityManager(new RMISecurityManager());
            new MyClient( args[0] );
        public MyClient(String host) {
            try {
                RemoteServer server = (RemoteServer)
                    Naming.lookup("rmi://"+host+"/NiftyServer");
                System.out.println( server.getDate(  ) );
                System.out.println(
                server.execute( new MyCalculation(2) ) );    // line 28
            } catch (java.io.IOException e) {
                  // I/O Error or bad URL
                  System.out.println("IOException from MyClient");
               e.printStackTrace();
            }  catch (NotBoundException e) {
                  // NiftyServer isn't registered
                  System.out.println("NotBoundException from MyClient");
               e.printStackTrace();
            } catch (Exception e) {
                  System.out.println("General Exception from MyClient");
                  e.printStackTrace();
    }I wouldn't pay much attention to this message since the MyServer has difficulty registering itself to RMI registry. As a result, MyClient could not
    locate MyServer via RemoteServer interface before giving up altogether.
    Unfortunately, I have not being able to create an interface (e.g. >MyCalculation.class as an interface, MyCalculationImpl.class as the >actual implementation of MyCalculation) since WorkRequest is an >abstract class, which does not allow MyClient to instanciates >MyCalculation on line 28.
    I don't see why not. What error messages/exceptions are you getting?
    Are you referring to the execute() method on line 13 in >RemoteServer.classNo, I am referring to line 28 of MyClient.class above after the following failed attempts to create an interface for MyCalculation.java:
    public interface MyCalculation extends WorkRequest { // Got a syntax error: interface expected here in Netbeans.
    } Or
    public interface MyCalculation {}
    public class MyCalculation extends WorkRequest extends MyCalculation { ... # Obviously cannot extend more than one class.Any suggestion?
    No. I said the remote method implementation (i.e. in your xxxImpl >class) doesn't need to be declared to throw RemoteException. The >remote method definition in the remote interface certainly does. I have taken out the RemoteException from 2 methods in MyServer.java. ie implementation of the RemoteServer.java.
    In short, I have used only one codebase server but puzzled whether MyCalculation.class (have split it up into interface & implementation) will be passed over to the
    server side by referenced, value or Dynamic Class Downloading. I do not want it to use Dynamic Class Downloading to do this.
    Thanks,
    Henry

  • IIOP dynamic stub downloading

    Hi,
    While working with EJB's (1.1 to 2.0) on different projects, I've never been able to setup dynamic downloading of EJB IIOP stubs. I had to include the stubs in the client's classpath everytime.
    I am now wondering :
    Is dynamic stub downloading possible with RMI-IIOP ?
    Is it a server specific issue (working with weblogic 6.1/7.0) ?
    Any experience or comments welcome...
    Ian

    Is dynamic stub downloading possible with RMI-IIOP ?I doubt it : RMI-IIOP ensures compatibility with plain-IIOP servers. Those server might not be written in Java at all, and have no idea what stub code you might want.
    I had to include the stubs in the client's classpath everytime.Not only that, but that's also the reason why you can't genuinely downcast a stub obtained through IIOP : you have to narrow() it (see javax.rmi.PortableRemoteObject), since the stub instance was instantiated by the client ORB (I mean, RMI-IIOP engine) on the grounds of the client-side information only, which doesn't know the server-side subtype.

  • Writing Dynamic code in smart form

    Hi All,
       I have a issue on Smart form . the smart form is customized view of bbp_po(srm) for po(purchase order) details  in that in a secoundary window where vedor adress is displaying .In the first line of the address name1 and name2 are displaying now my need is if the name1+name2 is more than 47 chars then i need  to shift name2 to next line how can i do this dynamic code plase i need it urgently .
    Thanks
    channu sajjanar

    Hi
    Write code yto count the no of character, if it is more than 47 then display NAME2 in second line else write in first line.
    for second line put conditionin text element  NAME2 <> space.
    This will work
    Thanks
    Shiva

  • VB ActiveX User Control fails to install on Windows 8 using IE10 with Code Download Error: (hr = 80070005) Access is denied.

    I have a VB VS2008 (.Net 2.0) ‘pure’ .NET based user control which used to be hosted in Internet Explorer.
    Because that approach is no longer possible in VS2013 (.Net 4.5) I have converted it to an VB ActiveX user control.
    This process involves digitally signing the user control DLL.
    Creating a setup project resulting in a setup.exe and MyUserControl.msi.
    Digitally signing both those components and then producing a cab file (which again is digitally signed).
    IE10 should then be able to install this using an object tag as follows
    <object id="editor" height="100%" width="100%"
     classid="clsid:EA47DB16-9272-4CB3-A800-C369A479396A" codebase="cab\MyUserControl.cab#Version=6,0,11,1" VIEWASTEXT>
    If I use the setup.exe and MyUserControl.msi directly on the client windows 8 machine before starting IE10 then the control is already installed (shows up in Programs and Features) and it works.
    If I don't do this and let IE install the control then it doesn't work.
    What I see is the IE prompt
    This website wants to install the following add-on: 'MyUserControl.cab'
    Clicking on install produces the User Account Control MsgBox
    Do you want to allow the following program to make changes to this computer
    Clicking yes doesn't install the control as expected
    The inf file that I'm using is currently
    [version]
    signature="$CHICAGO$"
    AdvancedINF=2.0
    [Add.Code]
    setup.exe=setup.exe
    MyUserControlSetup.inf=MyUserControlSetup.inf
    MyUserControlSetup.msi=MyUserControlSetup.msi
    [setup.exe]
    file=thiscab
    [MyUserControlSetup.inf]
    file=thiscab
    [MyUserControlSetup.msi]
    file=thiscab
    [Setup Hooks]
    RunSetup=RunSetup
    [Deployment]
    InstallScope=user
    [RunSetup]
    run="%EXTRACT_DIR%\setup.exe"
    I have defined the registry setting ForceCodeDownloadLog
    Examining the temporary internet files location after trying to install using IE10 I can see the following
    *** Code Download Log entry (15 Jan 2015 @ 11:49:18) ***
    Code Download Error: (hr = 80070005) Access is denied.
    ERR: Run Setup Hook: Failed Error Code:(hr) = 80070005, processing: %EXTRACT_DIR%\setup.exe
    LOG: Reporting Code Download Completion: (hr:80070005 (FAILED), CLASSID: ea47db16...,

    The problem here was the cab file.
    Using ProcessMonitor I found that the following entry was generated at the time of failure
    16:48:00.9222751            2920      IEInstal.exe         CreateFile              
    C:\Users\Jim\AppData\Local\Temp\IDC2.tmp\setup.exe             NAME NOT FOUND               Desired Access: Read Attributes, Read
    Control, Synchronize, Dis, Options: Synchronous IO Non-Alert, Non-Directory File, Disallow Exclusive, Attributes: n/a, ShareMode: None, AllocationSize: n/a
    Analysis of the contents of the cab file using PeaZip indicated that it didn't contain setup.exe which confused me for a while as the makecab /f MyUserControlSetup.ddf produced no errors.
    The MyUserControlSetup.ddf contained
    .Set DiskDirectoryTemplate=cab
    .Set CabinetNameTemplate=DocEditor.cab
    MyUserControlSetup.inf
    MyUserControlSetup.msi
    setup.exe
    Using makecab /f MyUserControlSetup.ddf /v3 I saw that the output was being written to 3 'disk' files but only one was present in explorer after it finished.
    So I guessed that the output was for floppy disks and changed MyUserControlSetup.ddf to contain
    .Set MaxDiskSize=CDROM
    .Set DiskDirectoryTemplate=cab
    .Set CabinetNameTemplate=DocEditor.cab
    MyUserControlSetup.inf
    MyUserControlSetup.msi
    setup.exe
    PeaZip now indicated that the cab file contained the 3 files I expected and using that cab in the codebase attribute installed my ActiveX control

  • How to write the dynamic code for RadioGroupByKey and Check Boxes?

    Hi,
    Experts,
    I have created a WD ABAP application in that i have used RadioGroupByKey and CheckBox Ui elements but i want how to write the dynamic code to that i want to display male and female to RadioGroupByKey and 10  lables to check boxs.
    Please pass me some idea on it and send any documents on it .
    Thanks in advance ,
    Shabeer ahmed.

    Refer this for check box:
    Do check :
    bind_checked property is bind to a node with cardinality of 1:1
    CHECK_BOX_NODE <---node name
    -CHECK_BOX_VALUE <--attribute name of type wdy_boolean
    put this code under your WDDOMODIFYVIEW:
    DATA:
    lr_container TYPE REF TO cl_wd_uielement_container,
    lr_checkbox TYPE REF TO cl_wd_checkbox.
    get a pointer to the RootUIElementContainer
    lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
    lr_checkbox = cl_wd_checkbox=>new_checkbox(
    text = 'WD_Processor'
    bind_checked = 'CHECK_BOX_NODE.CHECK_BOX_VALUE'
    view = view ).
    cl_wd_matrix_data=>new_matrix_data( element = lr_checkbox ).
    lr_container->add_child( lr_checkbox ).
    Refer this for Radiobutton :
    dynamic radio button in web dynpro abao
    Edited by: Saurav Mago on Jul 17, 2009 10:43 PM

  • Dynamic stub downloading question.

    It turned out that I've been killing time over and over again when setting up dynamic stubs downloading for RMI implementations.
    Wouldn't be it simple if RMI isolates developer from all those steps by
    a) creating stubs on the fly when the remote object gets bound and
    b) upload them to the client as a part of Naming.lookup() call?
    No need to rmic, http-/ftp-/file--server, additional security, etc. Can somebody explain me this or I am missing something here??
    Thanks.

    It turned out that I've been killing time No, you havent been killing time.
    over and
    over again when setting up dynamic stubs downloading
    for RMI implementations.
    Wouldn't be it simple if RMI isolates developer from
    all those steps by
    a) creating stubs on the fly when the remote object
    gets boundDo you know what this will ultimately mean? It means that some PROCESS, either the registry or something else, will NEED TO LOOK AT THE OBJECT THAT IT HAS ACCEPTED TO BE BOUND, OR IS JUST ABOUT TO ACCEPT TO BE BOUND and then check to see if it REALLY does extend the proper superclasses (UnicastRemoteObject for plain RMI, or PortableRemoteObject for all those RMI-IIOP lovers out there), THEN check if the service object REALLY DOES implement the remote interface TO THE LETTER, ........THEN check to see if the proper exceptions are going to be thrown if something goes wrong!!
    (i'm panting right now.....)
    That's simply madness. Do you have any idea how often an object can be:
    1: Bound to the registry
    2. REBOUND under a different name
    3. Removed and later REBOUND
    ?????? Its sick. The JVM/registry overhead will hit the roof!!!
    ok, lets go on....
    and
    b) upload them to the client as a part of
    Naming.lookup() call?What?? IS IT FOR THE CLIENT TO TRY AND CONNECT TO THE SERVER USING STUBS IT ALREADY HAS .......or is it for the server to somehow keep TABS on its client and SEND the stubs to it, just so it can talk to the server???????
    Doesnt make sense at all.
    >
    No need to rmic, http-/ftp-/file--server, additional
    security, etc. Can somebody explain me this or I am
    missing something here?Oh, buddy: you ARE missing something.

  • Dynamic implementation download for return values from EJB

    I try the following exemplary scenario regarding dynamic implementation download. Let's say there is a statless EJB deployed (e.g. OrderHandler) with a method getSomeOrder() returning Order object; where Order is actually an interface extending java.io.Serializable. For Order there is implementation class OrderImpl. Within the getSomeOrder() the EJB creates a new OrderImpl, populates it and returns as interface. The client looks up OrderHandler and calls getSomeOrder() method. Then, on Order a dummy: String getName() method is called.
    Now, the problem is various behavior with implementation dynamic download. I receive different behavior from 2 clients (1st being launched from within LAN with the server, 2nd from outside server's LAN). When I put OrderImpl in clients' classpaths, obviously they both work the same. When I leave only Order interface (!!the very goal of the test - dynamic impl. download!!), only the 1st client still works. I measured times in milis, and it looks that the OrderImpl is really downloaded, as the first getSomeOrder() call lasts around 10 times as long as further calls.
    The 2nd client hangs a while on the getSomeOrder() call and then throws UnmarshallException, stating that it has failed to unmarshal the returned object, which basically means no implementation got downloaded.
    Can anyone help?

    You can try putting the Impl classes on a webserver.
    while starting the server set the property
    -Djava.rmi.server.codebase=http://mywebserver:8080
    While running the client if the impl classes are not available in the classpath, it would download it from the webserver

  • Servlet with no dynamic code inside jsp pages

    Hello,
              I saw that a servlet is created even if there is no dynamic code inside jsp pages (scriplets & tags). Is it possible to avoid it on bea side ? (I am using portal 8).
              By the way, do you know if is it possible to define apache in order to avoid to send to bea the jsp which have no dynamic code inside ?
              thank you !

    JSP's always generate a servlet on all web containers. Apache/Tomcat is no
              different. If you have static content, make it an HTML page.
              Bill
              "hournon jc" <[email protected]> wrote in message
              news:22255787.1103297053148.JavaMail.root@jserv5...
              > Hello,
              >
              > I saw that a servlet is created even if there is no dynamic code inside
              jsp pages (scriplets & tags). Is it possible to avoid it on bea side ? (I am
              using portal 8).
              >
              > By the way, do you know if is it possible to define apache in order to
              avoid to send to bea the jsp which have no dynamic code inside ?
              >
              > thank you !
              

  • 'Unallowed tags or dynamic code' error on a page without these...

    Hi,
    I've been using InContext Editing for a few sites now and my clients have been very happy with it, but I have a new site that's having problems on just one page.
    http://www.windhampilates.com/index.php
    I've enabled ICE on the text areas below the main photo and nav bar, as I have on other pages. There are a few scripts running on this page, but the only difference on this page from the rest of the site is the rotating image at the top of the page.
    Ironically, I've used this same script on previous sites where I've used ICE and they've worked without any problems. Am I missing something?
    Really and truly appreciate  your help!
    - MaryAnn

    I can login, and try to edit, but the system won't save my changes and gives me the 'unallowed tags or dynamic code' error as the reason why it can't save the changes.
    I tried removing the jquery in the header, but that didn't seem to work:
    http://www.windhampilates.com/index-testjqueryerror.php
    I still can't get the edits to save and it's still giving me the same message.
    The only other non-static elements on the page are the newsletter subscription script and the Facebook link, but I have these on other pages and we can edit those pages without issue.
    Any other ideas?
    Thanks for your help!

  • Running Dynamic Code - Is it possible?

    Hi guys,
    I am interested to know whether there is a way I can run dynamic code in my java program. For example, I want to be able to write java code into a JTextArea and then run that code as like an extension of the program.
    In other words, if I wrote something simple like "System.out.println("Hi");, it would print the work "Hi" in the console as if it were part of the original program.
    Does anyone know if there is a way to do this? Alternatively, is there a way I can call the Javac tool from within a program, thus allowing me to dynamically compile a program.
    Thanks guys,
    WATTO
    [email protected]
    http://www.watto.org

    I think JSP is a variant of such a frame. You can
    execute a code compiling it.JSP is normally compiled into bytecode when it is first loaded by the container.
    beanshell and [url http://www-124.ibm.com/developerworks/projects/bsf]BSF are, I think what the poster is after, on this very frequently asked question :)

  • Dynamic code [i]replacement[/i]

    Hi all,
    I have seen dynamic code replacement used in Tomcat, Eclipse, jEdit, ... but whenever I go to research how to incorporate it into my applications, I just get a bunch of stuff about Erlang, python, and Java ClassLoaders, which if a class is already loaded don't bother reloading it.
    So does anyone know how I can use "Dynamic Code Replacement" not "Dynamic Code Loading"? (I'm doing stuff with Java WebServer Containers)

    IT works a little something like this.
    If you create a classlaoder to load your "replaceable" classes and ensure that your replaceable classes are not in the classpath (or that your classlaoder does not delegate to its parent bit dangerous security wise)). Then your classloader will load your replaceable classes (It will delegate to its parent but its parent will not find them). Then to reload your classes all you have to do is drop all references to your classloader and create a new classloader. It can then load your "repaced" classes.
    Acutally its not quite that simple. If any live references exist to any classes loaded by your classloader then your classloader will not go "out of scope" as those classes will reference the classloader.
    To do it properly takes good design. Take a look at the link RadcliffePike posted for one (pretty complicated) desgin. I believe that tomcat uses trees of classloaders to allow all the weapps to "live" independently of each other while allowing them to use the classes that are in the common/lib directory (shared jar files)
    matfud

  • Private meetings (dynamic codes) AND no lobby for PSTN callers?

    Hi All,
    Is there any way to have private meetings (therefore with dynamic entry codes) AND have PSTN callers bypass the lobby?
    I understand that the option PSTNCallersByPassLobby does not take effect if you are configured for private meetings?  In our scenario, we want private meetings to avoid potential issues with public meetings/static codes and over-running meetings
    etc., but we often have people joining meetings from a cell phone only and we do not to burden users with a PIN.
    I know we have the option to use public meetings/static codes by default and train users to set a dynamic code if the meeting requires it, but this again relies on user behavior.
    Any way we can have the effect of private meetings/dynamic codes AND PSTN Callers bypassing Lobby by default?
    Cheers

    Samuel,
    If you are talking about generating a separate meeting space for each meeting and having PSTN users bypass the lobby then yes - you can do that.   In outlook I have set my Lync meeting options to do just that - create each Lync meeting in a new
    space so each one is unique and back to back meetings don't let everyone join in to the same meeting.  I also have it set to allow PSTN users to bypass the lobby.  It works fine.
    Craig

Maybe you are looking for

  • HT204053 changing two apple ids into one

    My husband and I have two different Apple Ids and we are finding extremely difficult when we are trying to download all the music we want into our IPad Air. I made the mistake of creating a new ID not knowing I could have used the main one weve been

  • Sendpoint metadata in HTTP Adapter

    Hi All I'm trying to configure several parameters not through the adapter.ini file but through iStudio defined metadata. This is the standard way suggested in the (scarce) documentation to handle multiple endpoints and other parameters. According to

  • Why is Pages first launch so slow?

    When I launch Pages for the first time, it takes a long while before the program actually launches (it is almosty instantaneous on second launch). I was wondering why the inital launch is so slow and if anyone knew a fix to this. I was used to a rath

  • How to combine Submit value and item values in report condition?

    What I have is a report with some input parameters, one of which is a Select List with Submit that forces population of a second Select List. There is also a GO button. Depending on the combination of the two drop-downs, one of three report regions t

  • Setting a High Resolution when generating a PDF

    We build a lot of files for the outdoor industry (Billboards) the vendors send us the parameters that they want the files built at. For example, 1/20 th scale, and at that scale they set a certain "dpi" they require. So my questions: what is the max