Calling one applet from another passing database connection

We are trying to establish if it is possible to start an applet that connects to a database and use that as a 'menu'. From there we would call other applets. Is there a way to pass along the database connection from one applet to another. Any help is greatly appreciated.
null

Here' s a sample program in the Java Tutorial that messages between applets.
http://java.sun.com/docs/books/tutorial/applet/appletsonly/iac.html

Similar Messages

  • How to call one .SWF from another?

    How do I call one .SWF from another. I built a very beefy
    base .SWF, and want to add music overlay, and an intro slide show
    to the exsting Flash animation, but put it in a second .FLA/.SWF
    file. How do I call one from the other?
    This will be embedded in an HTML file but I assume this is
    superfluous to my question.
    F.Z.

    I think you should open that Another SWF (FLA),
    and add some actionscript..
    For example, you could create a movie clip, and write
    actionscript in the
    first keyframe:
    loadMovie("
    http://www.somewebpage.com/movie.swf",
    this);
    "FredZimmerman" <[email protected]> wrote in
    message
    news:ftnjas$mj5$[email protected]..
    > How do I call one .SWF from another. I built a very
    beefy base .SWF, and
    > want
    > to add music overlay, and an intro slide show to the
    exsting Flash
    > animation,
    > but put it in a second .FLA/.SWF file. How do I call one
    from the other?
    >
    > This will be embedded in an HTML file but I assume this
    is superfluous to
    > my
    > question.
    >
    > F.Z.
    >

  • CallerPrincipal when calling one sessionbean from another

    Hi all,
    I have a little problem when calling one sessionbean from another sessionbean. The problem is, that in the method, which is called, is used SessionContext's getCallerPrincipal().getName(). This works great from client, but from other sessionbeans getCallerPrincipal() retuns an "ANONYMOUS" principal. How can I set the correct principal (the principal from the first sessionbean)?
    Thank you
    My env: Glassfish 2.1.1, Netbeans 6.8, Eclipselink 2.0.0, Java 1.6.0.18
    My code:
    @Stateless
    public class ABean implements ASessionRemote{
    @Resource
    SessionContext ctx;
    @Override
    public void aMethod(){
    String name = ctx.getCallerPrincipal().getName(); // the name is ANONYMOUS, when the call is done from other sessionbean
    @Stateless
    public class BBean implements BSessionRemote{
    @Resource
    SessionContext ctx;
    @EJB
    private ASessionRemote aSessionBean;
    @Override
    public void bMethod(){
    aSessionBean.aMethod();
    }

    "This works great from client"
    What do you mean by this, i.e what sort of client are you using (stand alone app, servlet) ?
    what shows up if you printout the caller principal in the calling bean ?
    are the two ejbs in the same ear ?
    what security meta-information are you using in ejb-jar.xml and sun-ejb-jar.xml, if any ?

  • Open/Call an applet From another applet

    Hi everybody,
    I want to open/call an applet from another
    applet via a button. when the user press
    the button, next applet load.
    Appreciate your response.
    null

    try {
    URL secondpage="second appleturl.html");
    getAppletContext().showDocument(secondpage,"seconf applet_frame");
    }catch (java.net.MalformedURLExceptione){*Write your error messages here*/}
    Regards
    Sonlam
    null

  • Calling one script from another

    InDesign has a nice mechanism for calling one script from another, so code can be made modular. What about FrameMaker ExtendScript? What methods are people using to call one script from another? Thanks for any suggestions.
    Rick Quatro

    Hi Trevor,
    Note that ExtendScript is Javascript plus FM objects and methods, so you need to stick to Javascript syntax rules. The right way to include another script source is as follows:
    #include "scriptname.jsx";
    If this works when running the main script from the ESTK, you know it finds the included script. When you then Export the script to Binary (from the File menu of the ESTK), the binary will include the embedded script as well. After this you have a jsxbin file, which you can drop into one of the two available startup folders to make it fire automatically when FM starts. Or you can move it anywhere else and run it via the File > Script > Run command. The main idea here is that when compiling a script into binary format, all include references are resolved and the script contains the complete code. If you run the jsx, the script is interpreted and requires a correct relative reference to any included script.
    I hope this clarifies things a little
    Ciao
    Jang

  • How to Call one EJB from another

    Hi all
    I am trying to call one EJB in one system from another EJB residing on diferent system...
    Both are Stateless session beans ...
    I can't use No-args Intialcontext() as i need to specify the Ip address of other system to be looked up.....
    So i am using properties Dorg.omg.CORBA.ORBInitlalHost....
    But its not looking up..Its telling not bound...But i called it from standalone client remotely...
    Am i wrong..?
    I hope I am in right path....
    I hope ill get reply as fast as possible...
    Gopal V

    Hi ken Thanks for replying....
    Ya i packed it as a jar (using Export tool in Eclipse3.2)....
    I am using SUN AS 9.....
    I packed bean1 and bean2 as two different jars in the same domain...
    Here is my code...
    Bean1:
    @Stateless(mappedName="ejb/Second")
    public class SecondIMPL implements SecondRemote {
         public FirstRemote obj;
         public String connect() {
              try{
                   InitialContext ctx= new InitialContext();
                   FirstRemote obj =(FirstRemote)ctx.lookup("ejb/First");
                   System.out.println("Client :"+obj.bMethod());
              }catch(Exception e){
                   e.printStackTrace();
              return "Check server Log";
    }Bean2 :
    @Stateless(mappedName="ejb/First")
    public class FirstIMPL implements FirstRemote {
         public String bMethod() {
              return "From First Bean";
    Client:
    public static void main(String[] args) {
              try{
                   InitialContext ctx= new InitialContext();
                   SecondRemote obj =(SecondRemote)ctx.lookup("ejb/Second");
                   System.out.println("Client :"+obj.connect());
              }catch(Exception e){
                   e.printStackTrace();
    Here is my Stack Trace...
    [#|2007-05-24T18:35:17.214+0530|WARNING|sun-appserver-pe9.0|javax.enterprise.system.stream.err|_ThreadID=18;_ThreadName=p: thread-pool-1; w: 19;_RequestID=bb4848e7-829a-421d-a560-93659898eb02;|
    javax.naming.NamingException: ejb ref resolution error for remote business interfacecom.SecondRemote[Root exception is java.lang.ClassNotFoundException: com.SecondRemote]
         at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:350)
         at com.sun.ejb.containers.RemoteBusinessObjectFactory.getObjectInstance(RemoteBusinessObjectFactory.java:61)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
         at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:314)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.FirstBean.rediff(FirstBean.java:16)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1050)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:165)
         at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2766)
         at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:3847)
         at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:190)
         at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:110)
         at $Proxy36.rediff(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:121)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:650)
         at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:193)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1705)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1565)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:947)
         at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:178)
         at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:717)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.dispatch(SocketOrChannelConnectionImpl.java:473)
         at com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl.doWork(SocketOrChannelConnectionImpl.java:1270)
         at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:479)
    Caused by: java.lang.ClassNotFoundException: com.Second
         at com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:701)
         at com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:614)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at com.sun.ejb.EJBUtils.getBusinessIntfClassLoader(EJBUtils.java:568)
         at com.sun.ejb.EJBUtils.lookupRemote30BusinessObject(EJBUtils.java:320)
         ... 31 more
    |#]

  • Calling one applet to another applet

    Hi,
    How to call one applet program to another applet program.
    thanks in advance

    ManiForum wrote:
    ..How to call one applet program to another applet program.3 tips
    - How to Google.
    - How to ask [smart questions|http://catb.org/~esr/faqs/smart-questions.html].
    - How to use [question marks|http://www.google.com/search?q=question+marks] to denote a question.
    ..thanks in advanceNo wuckin' furries.

  • How to call one program from another program

    Hai,
      How to call one program through another program.
    Example.
       I have two programs 1.ZPROG1 2. ZPROG2.
    When i execute ZPROG1 at that time it should call ZPROG2.

    Hi ,
    u can use submit statement to call a program .
    DATA: text       TYPE c LENGTH 10,
          rspar_tab  TYPE TABLE OF rsparams,
          rspar_line LIKE LINE OF rspar_tab,
          range_tab  LIKE RANGE OF text,
          range_line LIKE LINE OF range_tab.
    rspar_line-selname = 'SELCRIT1'.
    rspar_line-kind    = 'S'.
    rspar_line-sign    = 'I'.
    rspar_line-option  = 'EQ'.
    rspar_line-low     = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'H'.
    APPEND range_line TO range_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'K'.
    APPEND range_line TO range_tab.
    SUBMIT report1 USING SELECTION-SCREEN '1100'
                   WITH SELECTION-TABLE rspar_tab
                   WITH selcrit2 BETWEEN 'H' AND 'K'
                   WITH selcrit2 IN range_tab
                   AND RETURN.
    regards,
    Santosh thorat

  • Query about Calling One Form from Another using Personalization

    Hi All,
    I have created a Custom form using TEMPLATE.fmb and created functions in Apps and assigned to Responsibility etc and it all works OK.
    Now, I need to call this Custom form from another seeded(PO form) Via Tools -> Menu.
    using Forms personalization I can get the Menu Entry and Actions to execute the Form successfully from the PO Form.
    BUT, I need it to automatically query records in my CUSTOM form based on my current PO_HEADER_ID value on my PO Form.
    How can I do it ?
    Do I need to modify my Block and add some parameters and then pass a value via Personalization ?
    Please help !
    Thanks
    Shankar

    Hi Shankar,
    Please refer my article on metalink
    Zoom to AR Transactions and AR Receipts Form from Collections Form using Forms Personalization - Doc ID: 430643.1
    This article explains how to open the AR transactions form from another form. When it opens the form it automatically queries for the Invoice number of the calling form. You should be able to use this logic for your requirement.
    Hope this helps.
    Thanks,
    Anil

  • Calling one DAO from another DAO

    Ok I am having a problem. But let me first give you the background:
    I have a BaseDAO in which Connection is encapsulated:
    public abstract class BaseDAO {
       private Connection _connection = null;
       public BaseDAO( Connection connection ) {
          this._connection = connection;
       public Connection getConnection() {
          return _connection;
       public void setConnection(Connection connection) {
          this._connection = connection;
    }All my DAOs are inherited from BaseDAO. All of their constructors call BaseDAO's constructor.
    I have a DAO Factory in which Connection is encapsulated:
    public abstract class DAOFactory {
    private Connection _connection = null;     
    public Connection getConnection() {
      return _connection;
    public void setConnection(Connection connection) {
      this._connection = connection;
    }In concrete implementation of DAO Factory I instantiate a DAO by passing the connection. For example :
    public GenericDAO getGenericDAO() {
    GenericDAO genericDAO = new GenericDAOMSSqlServer( getConnection() );
    return genericDAO;
    }In this way I make sure that the same Connection is used by all the DAOs instantiated from a particular DAO Factory.
    In my unit-of-work, I first got DAOFactory, then sets its Connection:
    DAOFactory daoFactory = DAOFactory.getDAOFactory();          
    daoFactory.setConnection( _connection );
    Then I use daoFactory to get DAOs:
    GenericDAO genericDAO = daoFactory.getGenericDAO();
    Everything is working good. Now suppose I have a DAO method getShifts() in ShiftDAO. Inside this method I want to call DAO method getRowsetAdaptor() in GenericDAO. I want to know what is the proper way to do this thing.
    What I think I need in DAO method getShifts() is:
    a) get the DAO Factory which is used to instantiate ShiftDAO (this way I will get the same Connection)
    b) use that DAO Factory to instantiate GenericDAO
    c) use the method getRowsetAdaptor() of GenericDAO
    d) continue processing getShifts()
    What do you guys think?

    Hi,
    I want to call DAO method getRowsetAdaptor() in GenericDAO. I want to know what is the proper way to do this thing.
    What I think I need in DAO method getShifts() is:
    a) get the DAO Factory which is used to instantiate ShiftDAO (this way I will get the same Connection)
    This seems to imply that a different DAOFactory was used to create ShiftDAO. If so, how would it know how to create a GenericDAO. And if it does why have 2 DAOFactories.
    b) use that DAO Factory to instantiate GenericDAO
    see a
    c) use the method getRowsetAdaptor() of GenericDAO
    If this method is needed by both GenericDAO and ShiftDAO, then it belongs in BaseDAO and not GenericDAO. In the case that this is not possible, then both ShiftDAO and GenericDAO need to implement it or call a utility call that implements the method.
    d) continue processing getShifts()
    see c
    Hope this helps.
    Cheers,
    vidyut

  • Calling One Filter from another Filter

    Hi Every body,
    I am a faculty in a computer institute, I want to call one ServletFilter [Filter 2] from another ServletFilter [Filter 1] then, from the Filter 2, I want to call the servlet.
    This is for one of my student project.
    Is it possible something like that, when I read the theroy i can find some thing like that , but I was unable to implement it.
    Please help me in this regard.
    Sulfikkar

    chain.doFilter() method will do that for you.
    Just specify your filters in the web.xmland they will be called in the order they are defined in the web.xml

  • How to call one procedure from another procedure

    Hi all,
    Could anyone give me clue how to call a procedure contains out parameters
    from another procedure.
    I had following procedures.
    1)
    create or replace procedure INS_PUR_ORDER
    p_poamt in number,
    p_podate in date,
    p_poid out number
    is
    begin
    select pkseq.nextval into p_poid from dual;
    insert into pur_order(poamt,podate,poid)
    values (p_poamt,p_podate,p_poid);
    end;
    2)
    create or replace procedure INS_PUR_ORDER_DETAIL
    p_pounits in number,
    p_poddate in date,
    p_poid in number)
    is
    begin
    Insert into pur_order_detail(podid,pounits,poddate,poid)
    values(pdseq.nextval,p_pounits,p_poddate,p_poid);
    end;
    I need to write a 3rd procedure which calls above two procedures.
    like
    call first procedure ,basing on the return value
    i.e if p_poid != 0 then
    we need to call second procedure
    in the loop.
    thanks in advance.
    rampa.

    Not sure what are you doing, you can not assign cursor to another cursor, may be you are looking for this?
    SQL> create or replace procedure proc1 ( result out sys_refcursor)
      2  is
      3  
      4  begin
      5     open result for
      6       select 'HELLO WORLD' from dual ;
      7  end proc1 ;
      8  /
    Procedure created.
    Elapsed: 00:00:00.01
    SQL> create or replace procedure proc2
      2  is
      3     l_cursor sys_refcursor ;
      4  begin
      5     l_cursor := proc1 ;
      6   
      7  
      8     open l_cursor;
      9     fetch l_cursor into l_text;
    10     dbms_output.put_line(l_text);
    11     close l_cursor;
    12  
    13  
    14  end proc2 ;
    15  /
    Warning: Procedure created with compilation errors.
    Elapsed: 00:00:00.01
    SQL> show error;
    Errors for PROCEDURE PROC2:
    LINE/COL ERROR
    5/4      PL/SQL: Statement ignored
    5/16     PLS-00306: wrong number or types of arguments
             in call to 'PROC1'
    6/4      PLS-00201: identifier 'L_TEXT' must be
             declared
    6/4      PL/SQL: Statement ignored
    8/4      PLS-00382: expression is of wrong type
    8/4      PL/SQL: SQL Statement ignored
    9/4      PL/SQL: SQL Statement ignored
    9/24     PLS-00201: identifier 'L_TEXT' must be
             declared
    10/4     PL/SQL: Statement ignored
    10/25    PLS-00201: identifier 'L_TEXT' must be
             declared
    ---- this is the correct waySQL>ed
      1  create or replace procedure proc2
      2  is
      3     l_cursor sys_refcursor ;
      4     l_text varchar2(100);
      5  begin
    ---- procedure call
      6     proc1(l_cursor); 
    7    -- open l_cursor;
      8     fetch l_cursor into l_text;
      9     dbms_output.put_line(l_text);
    10     close l_cursor;
    11* end proc2 ;
    SQL> /
    Procedure created.
    Elapsed: 00:00:00.01
    SQL> set serveroutput on
    SQL> execute proc2;
    HELLO WORLD
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.00
    SQL>

  • Calling one BPM from another BPM.

    Hi Guys,
       I'm trying to call an existing(working!) BPM from another BPM. Its a synchronus call. However in moni I see it as errored out on the outbound side. The error in the PE is:
    <b>CL_SWF_XI_MSG_BROKER method SEND_SYNCHRON cannot be executed.</b>
    I checked the following thread(<i>Re: Object CL_SWF_XI_MSG_BROKER method SEND_SYNCHRON cannot be executed), but those notes are already applied. Any idea, what could be the problem?
    Thanks,
    Harsh
    PS: We are on SP16.

    Hi Krishna,
       I have a doubt regarding transformations. In some of my transformations, I'm adding/stripping soap envelopes using XSL. For these messages, I'm only concerned about my target structure. Since there is not graphical mapping, I've assigned the same(target) structure to the source. The source message, I was assuming will not be validated(against the source structure) and thus will not throw an error. Could this be the problem, if so, what is the solution?
    Thanks,
    Harsh

  • Hope u will send me the details of calling an applet from another

    hai to all
    i am trying to do an applet ,and it corrct in jdev ide,but trying to run in explorer
    i cant connect the database,
    but in applet viewer also i cant call another
    applet throught a button or any thing
    i hope u will send me details
    and thanks a lot to Joe silva
    thanks in advance
    anas
    null

    I've not done it myself but I think you must have a name for the second applet specified in the html tag. That is how the first applet will be able to identify the second applet.
    maybe..
    <APPLET CODE="FirstApplet.class"></APPLET>
    <APPLET CODE="SecondApplet.class" NAME="ReceiverName"></APPLET>
    then in your java code
    SecondApplet app = (SecondApplet) getAppletContext().getApplet("ReceiverName");
    if (app != null)
    <execute code>
    But I've not done it, so its only a suggestion...

  • How can i call one report from another report (Drill Down Approach)

    Hi Friends,
    I've two reports in completely different layout format.
    One is in Crosstab & another is in Tabular.
    Now i want to call my Tabular report(report 1) from my Crosstab (report 2) without using BO's default drill down feature. Or, you can show using BO's feature if it supports my requirement.
    How to do that?
    Is it at all possible?
    Please share your thoughts. Thanks in advance for your time.
    Regards.
    Satyaki De.

    hi
    you can use openDocument for this.
    [http://help.sap.com/businessobject/product_guides/boexir31/en/xi3-1_url_reporting_opendocument_en.pdf]
    I would suggest to use variables that build the HTML code for the hyperlinks dynamically, and display them in your crosstab. Set the display option for the related cells (ie. the cells where your variables are displayed in) so that the cell's contents as interpreted as HTML code.
    Regards,
    Stratos

Maybe you are looking for

  • How do I create a downloadable link from an Interactive PDF file created out of InDesign CS6?

    Hello, I created an Interactive PDF file out of InDesign and would like to make the large file a downloadable link and share it with the user in an email. I do not want to use DropBox or GoogleDrive. The company I contract for has their own site - do

  • Z report for purchase register

    Hello Friends, My client is having Z report for running purchase register. but if he runs reports, conditional values are not flowing to the report. Only quantity, amt, net order price, UOM are appearing, vat, duties, freight are not displaying in th

  • Re Install from Win to Mac

    I have Photoshop CS4 Extended, installed on my Windows based PC. I am in a process to replace my PC with a new  Mac. How can I transfer my License and install the CS4 on the new Mac?

  • F/H jk-3001 not recognised in itunes

    Hi new to this forum can anyone explain why itunes does not recognise my ipod when i open itunes please any help would be very much appriated Thanks.

  • Having trouble opening a .swf in a movie clip

    Okay, so I have been searching around quite a bit to get this figured out. I have my main .swf file which is pretty much my entire site and I want to open a few other galleries separately to quicken up the loading time. So I created the galleries I w