How to pass values between applet and jsp

I have a jsp calling an applet which needs to return value to the calling jsp based on the action. Once the applet returns value to the calling jsp, I need to put that value into the session so that I can use it for the other pages. Could anyone have suggestion how to do it. I am new to applet development. Appreciate your help.

Why does it have to send the value back via the same JSP? Why not create a servlet to take input from the applet?

Similar Messages

  • Pass Object Between Applet and JSP Page

    Hi all,
    How can I pass an Object(such as Vector, File), rather than just string to the Applet from a JSP page?
    Thank you.

    I used Base64Encoder and Base64Decoder from servlets.com utilities.
    * convert any serializable object to a String
    public synchronized static String objectToString(Serializable obj) throws Exception {
        ByteArrayOutputStream bos = new ByteArrayOutputStream(100);
        ObjectOutputStream oos = new ObjectOutputStream(bos);
        oos.writeObject(obj);
        byte[]bytes = bos.toByteArray();
        bos = new ByteArrayOutputStream(); //to save the encoded String
        Base64Encoder enc = new Base64Encoder(bos);
        enc.write(bytes);
        String encodedString = bos.toString();
        //close all
        enc.close();   
        oos.close();
        bos.close();
        return encodedString;
    * Recreates the object from the encoded String
    public synchronized static Object stringToObject(String str) throws Exception {
        ByteArrayInputStream bis = new ByteArrayInputStream(str.getBytes());
        Base64Decoder dec = new Base64Decoder(bis);
        ObjectInputStream ois = new ObjectInputStream(dec);
        Object obj = (Object)ois.readObject();
        ois.close();
        dec.close();
        bis.close();
        return obj;
    }

  • Can objects be passed between Applets and JSP?

    Can objects be passed between Applets and JSP? If so how? Thanks in advance.
    Scott

    see if this helps,
    http://forum.java.sun.com/thread.jsp?forum=54&thread=136847

  • Use context to pass value between JPF and Java Control

    hi,
    Can we use context to pass value between JPF and Java Control? It works if i m using InitialContext in the same machine but i dun think it will works if i put Web server and application server in different machine. Anyone have an idea how to do it?
    I also want to get the method name in the onAcquire callback method. Anyone knows how to do this?
    thks
    ?:|

    Hi.
    Yoy can the next options for make this:
    1. Pass your values in http request.
    example: http://localhost/index.jsp?var1=value1&var2=value2&var3....
    2. You can use a no visible frame (of height or width 0) and keep your variables and values there using Javascript, but of this form, single you will be able to check the values in the part client, not in the server. Of this form, the values of vars are not visible from the user in the navigation bar.
    Greeting.

  • How to pass values between views in FPM - GAF

    Hi Experts ,
    i have a doubt in FPM how to pass values between views .
    For Example:  i am having 2 views -  1 ) overview , 2 ) edit  using  the GAF
    in 1st view (overview ) i have a table displaying the employee details , i will select a single employee from that table for editing .
    how to pass the selected employee details to the 2 nd view (edit ) .
    Thanks & regards
    chinnaiya P

    Hi chinnaiya pandiyan,
    Please follow below steps:
    1. To achieve this u need to create two context nodes in the component controller.
    2. Say one is EMPLOYEE_DATA and other is SELECTED_DATA.
    3. Set the Cardinality of EMPLOYEE_DATA to 0..n and SELECTED_DATA to 1..1.
    4. Add same attributes to both nodes. (probably all those fields that are required in table and/or in edit view.
    5. Map both these nodes to OVERVIEW view.
    6. Map only SELECTED_DATA node to EDIT view.
    7. Create table in OVERVIEW view based on EMPLOYEE_DATA node.
    8. Create edit form in EDIT view based on SELECTED_DATA node.
    9. While navigating from OVERVIEW view to EDIT view, read the selected element of EMPLOYEE_DATA node and copy it to an element of SELECTED_DATA node. This should be written in PROCESS_EVENT method of component controller inherited from FPM component.
    10. Now u got the selected data in SELECTED_DATA node which will be displayed in EDIT view.
    Regards,
    Vikrant

  • How to pass value between two forms.

    Hi all,
    how to pass value between two forms(using :parameter),...
    Thanks
    Rajesh

    To use parameters, create a parameterlist with the named parameters
    DECLARE
      pl_id PARAMLIST;
      pl_name VARCHAR2(10) := 'tempdata';
    BEGIN
      pl_id := Get_Parameter_List(pl_name);
      IF not Id_Null(pl_id) THEN
        DESTROY_PARAMETER_LIST(pl_id);
      END IF;
      pl_id := Create_Parameter_List(pl_name);
      ADD_PARAMETER (pl_id,'MYPARAMETER',TEXT_PARAMETER,:BLOCK.VALUE);      
      CALL_FORM('MYNEWFORM', NO_HIDE, DO_REPLACE, NO_QUERY_ONLY, pl_id);
    END;In the new form you can then just access the parameters via :PARAMETER.MYPARAMETER;
    An alternative is the usage of globals:
    :GLOBAL.MYPARAM:=:BLOCK.VALUE;
    -- call the emp-form
    CALL_FORM('MYNEWFORM', NO_HIDE, DO_REPLACE);and in the new form use:
    DEFAULT_VALUE(NULL, 'GLOBAL.MYPARAM');
    IF :GLOBAL.MYPARAM IS NOT NULL THEN
    ...The advantage of gloabls is that they can also return values back to the calling form, which is not possible using parameters

  • How to Pass values between one webdynpro application to another

    Hi ,
        I know How to Pass Values Between the Application by URL But For My Requirement NO need The Pass in URL Rather Than That Please any one TEll me How to GEt VAlues BEtween the application......
    Thanks
    ANANTH.

    If you dont want to pass values through URL, then you must have to use component Usage with interface node.
    Or you can try like this,
    by appending field value to url,
    Data w_url type string,
    w_value type string.
    get the url of calling aplication
    call method cl_Wd_utilities->construct_wd_url
    exporting application name = name of second application( to which u want to pass parameter )
    importing out_absolute_url = w_url.
    ***Make the value type compatible that has to passed with url.
    w_string = lv_pernr
    ***Now attach the parameter and its value with url that have to passed to 2nd application
    call method cl_http_Server=>append_field_url
    exporting name = 'pernr'
    value = ' w_value'
    changing url = w_url.
    then popup window for 2nd application with above url
    lo_window = lo_window_manager->create_external_application ( url = w_url ).
    lo_window -> open( ).
    ***now in wddoinit of 2nd application
    data lv_param type string
    lv_param = wdr_task=>client_window->get_parameter( ' pernr ').
    Now you can use lv_param in 2nd application.
    Regards
    srinivas

  • How to Pass values from XML to JSP??? Urgent Please Help me

    Hi guys,
    I am new to XML, I want to pass values from XML to JSP. I have a xml file with attributes, I should send this values to a JSP file. How is it??? Please Help guys.... its very urgent. Please send me how to do it with an example or atleast any urls related that....
    Looking for ur favourable reply.
    Thanks in advance,
    Sridhar

    in a servlet :
    parse your xml file (see how at the end of the post) and
    put the values you want in the request attributes
    request.setAttribute("value1", value1);
    ...redirect to the jsp
    in the JSP:
    get the wanted attributes:
    String value1=(String)request.getAttribute("value1");To learn how to parse a xml file, pay a look at this page, it explains how to read the XML document to build an object representation, and then how to navigate through this object to get the data
    http://labe.felk.cvut.cz/~xfaigl/mep/xml/java-xml.htm

  • How to pass values between pages?

    Hi
    Anybody know how you pass values like ids between pages using buttons?
    Cheers
    dan
    Message was edited by:
    user551484

    Hi
    Why do you want to do this? You can access values from other pages so if you are on page 2 and there is an item on page 1 called P1_ID you can simply assign it to an item on page 2 by typing in P1_ID in the source value for your page 2 item.
    Or you could reference it direct in your pl/sql process by typing &P1_ID. (note the fullstop)
    If you did want to pass a value using a button you can do so by clicking on the button name in then scroll down to the section called optional URL redirect.
    set target is a - to page in this application
    then select the page you want the button to send you to
    then click the flashlight icon next to set these items
    you can then select the page item you want to send the value to and the page item you are getting the value from.
    Danny
    Message was edited by:
    Danny Roach

  • How to pass value between models?

    Dear all,
    I use VC 7.0 composer to create dashboards. That include one overview dashboard (model) to show seven KPI in one screen and I also have seven detailed dashboards (models) to show the detail of each KPI.  Each dashboard has their own iView .   User will only need to pick a plant once at the overview dashboard and I expect the plant value will be passed to other seven detailed dashboards.
    Since those dashboards are saved in different models, I just wonder is it possible I can pass the value from the overview dashboard model to the separated detailed dashboard models? The reason I donu2019t put all dashboards in one model because I need to have different reports assigned on the left of the screen for each dashboard in portal. If I need to accomplish this in portal, I believe I need separate iView(model) for each dashboard. Please correct me if I am wrong since I am new to portal development. Thanks.

    I think it is possible to pass values between models.
    Just creat on "Write-RFC" and one "Read-RFC"
    The RFC has just the function to write/read a value into an customer table...
    ^^ We have tried this scenario and it works perfect.
    Regards
    Florian

  • How to pass parameters between main and sub vi during parallel execution using the VI server technique?

    Hello All,
    I am working with the following example (from previous postings on this
    board) that demonstrates how to run a sub vi in parallel with the main
    vi.  I'd like to pass parameters between the main and sub such as
    the control (delay) and indicator (value) parameters of my subvi
    example.  Does any one know how to do this?  Parallel
    execution is important for me, I cannot just paste the subvi icon into
    my main diagram (two nested while loops...)
    Many thanks,
    Luis
    Message Edited by cascao on 08-16-2005 08:42 PM
    Message Edited by cascao on 08-16-2005 08:42 PM
    Attachments:
    VI_Server_technique.vi ‏32 KB
    SubVI_1.vi ‏19 KB

    cascao wrote:
    Hello All,
    I am working with the following example (from previous postings on this
    board) that demonstrates how to run a sub vi in parallel with the main
    vi.  I'd like to pass parameters between the main and sub such as
    the control (delay) and indicator (value) parameters of my subvi
    example.  Does any one know how to do this?  Parallel
    execution is important for me, I cannot just paste the subvi icon into
    my main diagram (two nested while loops...)
    Many thanks,
    Luis
    Luis, you can use the VI Server methods 'Set Control Value' and 'Get Control Value', as demonstrated in the attached examples.
    -Franz
    Attachments:
    VI Server.zip ‏26 KB

  • How to map values between Contract and Purchase Order...

    Hi friends,
                        We are using SRM 5.0 (ECS). I am facing a problem with Purchase Order.
    . I am creating Contract locally through Live Auction. After that I am creating Purchase Order through Live Auction. So in Purchase Order Quantity, Net Price, Gross Price, and Long Text etc. not coming which is defined in Contract.  PO capturing the values from Live Auction, means no relation between the Contract and Purchase Order. After making Contract again I have to changes in the Purchase Order.
                So how to map the values from Contract to PO in SRM?  I want to map between contract and Purchase Order like R/3. At the time of creation of PO ( in R/3 )  we can adopt the Contract so all the relevant values comes from Contract to PO. In SRM how will I do?
    Please suggest me.

    When you create PO and a contract from a Live Auciton, they will not be mapped.
    While creating a PO (BBP_POC - Process Purchase Order); in the PO line item assign the contract and item reference. Only then they will be linked.
    Hope this helps.
    Regards
    Kathirvel

  • How to pass values between two pages

    also see:
    In portlets, how to use a html form passing  values to the another page?
    and
    htmlFormActionLink() method
    in common B/S developing, use html link add with a parameter or some parameters or we can submit it in a form to post values to another page .but how to do these in portal?
    I tried to write the code, but couldn't run at all!
    the provider.xml is still no problem!
    would you be so kind as to help me ?
    thanks!

    Hi Ravi,
            Using the call
    navigation->set_parameter( name='myparameter' value = myvalue ).
    you can set the page parameter myparameter to the value myvalue. This value can then be used for processing in the subsequent page.
    If the form field (in the layout part) and the page parameter are of the type string and are specified by the same name (in this case, myparameter), the following abbreviation can be used:
    navigation->set_parameter( 'myparameter' ).
    Using the set_parameter you can pass only the parameters of type string. If you wish to pass more set of values then you can call a method and then export the values of the drop down.
    Pls reward if useful.
    Thanks.

  • How to  pass data between JDialog and its parent window ?

    Hi,
    I am new to swing. I want to know how pass data between a JDialog and its parent window.
    If you have any information please reply with example code.
    Thank You

    hi Encephalopathic ,
    I was looking for something like as it was given in the link provided by you.
    Thank you for reply It really helped me.

  • Passing objects between Servlets and JSP

    Hi,
    I have passed a ResultSet from a Servlet to JSP using RequestDispatcher forward(). I can access the ResultSet in the JSP page. How can I now pass this ResultSet into another JSP page once the form has been submitted?
    Thanks in advance.

    You should never passing expensive resources like ResultSet around like that. This indicate an open DB connection somewhere while it should already be closed at this stage.
    Read on about the DAO pattern and make use of servlets and beans.

Maybe you are looking for

  • APEX_APPLICATION.G_F01(i)

    Hi I have an application that is sending emails to various users, who have specific information sent to them in the emails. what is happening at the moment is that when i check the checkbox for the 3rd person [APEX_APPLICATION.G_F01(i)] they get the

  • Mail has no content

    From this morning my exchange mail account has no content in any of my mail. It is the same on my iMac. Both my iPad and iphone is still seeing the content so I assume it is OS Lion that has the problem. Any experience or help would be appreciated. I

  • Print post-dated checks given to vendors

    Hello experts, I have this issue. My client pays many of his vendors with post dated checks. They use f-43 to post this payment by using posting key 39 and special GL W. They want while posting the payment after saving to be able to print the receipt

  • Change of Production Order to Project Stock from unrestricted stock

    Hello Experts, I need to have a workaround of transaction CO02. Actually, we have already implemented PS by using Project Stock but the problem is that we have almost thousands of production orders  that will come into unrestricted stock after produc

  • Font size in user interface is too small

    I am working on a trial version of RoboHelp 10 and I can't read the interface.  I really need this software, but will not be able to use it if I can't use the interface.  All of my appearance settings in Windows are maximized for size. Any ideas?