Passing parameters from an applet to a URL

I need to pass information from an applet to an html page or JSP page, is this possible? Thanks.

Yes you can!
The following code might works (with some modifications ;)):
AppletContext context = this.getAppletContext();
URL url = new URL("http://host:port/path?parameter=value");
context.showDocument(url, "windowName");In addiction, consider java.net.URLEncoder.encode() method to encode properly your parameters.
Regards
Paolo

Similar Messages

  • Passing input parameters from an applet to a JSP page

    Hello all,
    Yes, its one of these questions which I have tried to find a solution from the already large number of postings but with no luck. I'm still a novice to Java/JSP so bear with me.
    Consider this scenario.
    1. An applet which has two input boxes (say First name and surname). 2. These parameters will be passed to a JSP page (so the applet will call a JSP page).
    3. The JSP will have have the necessary logic (or actually a JavaBean will) to connect to a database and add a new record with these parameters (first name and surname).
    I also need to consider editing/updating the record in the database. So a JSP page will connect to the database, retrieving the required record from the database and then display the parameters back in an applet in two input boxes (first name and surname) to be edited and saved again.
    I have been able to develop a similar application using simple HTML forms to add and update records in a database so I'm not worried about the database connectivity simply the issue of passing parameters from the applet to the JSP page and vice versa (for edit/update).
    Once i've managed to do this with input boxes, I can experiment with the other input types radios, checkboxes, select etc.
    Many thanks in advance,
    Assad

    create an URL object with u'r specified link of the java class and send the parameters..write trhis action in any buttonclick event in u'r applet.

  • Passing parameters from a browser URL to Flash

    Flash CS3, AS3
    Is there any way to pass parameters from the URL line in a
    web browser to actionscript?
    ie. so if you had something like the following URL link in
    the browser...
    http://www.somedomain.com/someswf.swf?var1=10&var2=false
    ...it would pass var1 and var2 to someswf.swf.
    (Hypothetically, of course - I'm unsure as to the necessary syntax)
    Is this possible? Or would I need some intermediary software?
    Thanks
    Rick

    i answered a very similar forum query a few days ago
    here
    You need to look into loaderInfo.parameters.

  • Passing parameters from an URL to a WAD Web Template 7.0

    Hi guys, I need to pass parameters from an URL to a web template created with WAD 7.0. We need to open a template with certain filters starting from a link button located on an Xcelsius Dashboard. Our customer wants a web template to be opened with the filters defined within the Xcelsius
    The idea is to run the template with the filters defined in the URL. I know this was incredibly easy with WAD 3.x, but I didn't find any suitable solutions to use with WAD 7.0.
    What is the easiest way to do this with WAD 7.0?
    Thanks in advance and regards.
    Fabio Cristi

    Hi,
    It is possible in 7.0, but unfortunately it is a lot more complicated than i 3.x. There are quite a few examples here:
    http://help.sap.com/saphelp_nw70/helpdata/en/43/ef05462480025ae10000000a1553f7/content.htm
    I used it in a case where I wanted to embed a Web template in a BPS application and pass characteristic filters from the BPS application to the web template - similar to your requirements. Basically you need the following just to restrict one characteristic :o(
    &BI_COMMAND_1-BI_COMMAND_TYPE=SET_SELECTION_STATE
    &BI_COMMAND_1-TARGET_DATA_PROVIDER_REF_LIST-TARGET_DATA_PROVIDER_REF_1=DP_1
    &BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1=SELECTION_INPUT_STRING
    &BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-SELECTIONS-SELECTION_1-SELECTION_INPUT_STRING=PDS06
    &BI_COMMAND_1-CHARACTERISTICS_SELECTIONS-CHARACTERISTIC_SELECTIONS_1-CHARACTERISTIC=0D_PH2
    I could only get it to work with one characteristic and I suspect, that the reason is that the URL simply gets to long (very quickly). You have to repeat the above for every characterstic you want to use :o(
    Hth,
    Jacob

  • Passing parameters from URL to multiple iViews on a page.

    Hi Everyone,
    Could you please point me to a guide or howto, which explains on passing parameters from URL to multiple iViews on a page. I already know how to pass parameters from URL to a single iView (wiki).
    Thanks!
    Indy

    Hi Indy,
    Currently, passing parameters to the page which contains VC iViews is not supported, only directly in the iView's URL.
    Regards,
    Natty

  • Automatically Pass Parameters From Crystal To SAP B1

    So, I've searched extensively, and haven't been able to find an answer to my unique issue.
    This question pertains to linking a Crystal Report by parameter values to the OWOR table in SAP B1, and automatically passing those parameter values from the active record in SAP. Several other tables are used in sql joins, but the report is generated from an OWOR production order. I should start by stating that the report works great when manually populating the parameter fields when SAP calls for them.
    Overview:
    I've written a report in Crystal that contains several sub reports, some of which are looking to the DocEntry field as the parameter (DocKey@) and others that do not look to the DocEntry field at all - but rather use another field on the form to pull up information that spans more than just that one production order. I've chosen to upload as a layout in SAP (as that is all I've worked with up to this point, and it seems it needs to be to automate from a production order); but as I continue to research, it appears DocKey@ is mandatory when uploading as a layout, and in order to view the report from the actively selected production order, it must be a layout. Does that mean the parameter is required in all sub reports? Is it required in any sub report?
    I have two main issues that I need to hurdle for this report to work how I would like it to:
    1. Three of the eight Commands (one main command and seven sub-report commands) use the DocKey@ as the parameter to pass from SAP back to Crystal. The main report command, as well as four of the sub reports/commands are looking to another field in the OWOR record - which happens to be a re-seller defined field (UDF). For all intensive purposes, let's call this field BatchID. I'm assuming the sub report commands run in succession, one after the next. The reason I need to use BatchID as the parameter to pull from the record, rather than DocEntry, is there are other records that contain the same BatchID, and I want all of the info pertaining to that BatchID to populate on the report.
    Q1: The first command containing DocKey@ is automatically populated by SAP, and the user does not have to key that one in. However, the next two DocKey@ parameters do not automatically populate, and the user is asked for those values. How can I fix this?
    Q2: How can I automate the passing of BatchID so the user does not have to fill it in 5 times when they wish to preview the report(layout)? Can I link ObjectID@ to any field in OWOR? Is there any other way like creating a stored procedure or something , to automate the passing of that variable from the SAP active record to the crystal report - so the user doesn't have to key it in several times just to pull up the report?
    Thank you so much for even reading, let alone helping me with this issue!!
    Cheers,
    Nick

              Hi
              I had the same problem. Take a look at this newsgroup article on the businessobjects
              website :
              http://support.businessobjects.com/library/kbase/articles/c2015264.asp
              Grieg
              "Rada Pickens" <[email protected]> wrote:
              >
              >Hi,
              >
              >I'm getting the same error message, I was wondering if you fixed the
              >problem.
              > I'm stumped, can you help?
              >
              >Rada
              >
              >
              >"JAI" <[email protected]> wrote:
              >>
              >>I am passing parameters, from the JSP page to Crystal Report, i took
              >>the code from
              >>the below mentioned url, i dont know, it is something wrong with the
              >>jsp page
              >>or crystal report.
              >>i have created parameter field in crystal report to receive the value
              >>from the
              >>jsp page.
              >>If u r not clear with the error, please reply to me.
              >>
              >>i took the code from the below mentioned page
              >>
              >>reference page:
              >>----------------------
              >>http://dev2dev.bea.com/trainingevents/webinars/012804_faq.jsp
              >>parameterFieldsViewReport.jsp
              >>
              >>
              >>error displaying in the jsp page
              >>-----------------------------------
              >>com.crystaldecisions.report.web.viewer.CrystalReportViewer
              >>Some parameters are missing values
              >
              

  • Issue with passing parameters to an applet?

    Hi,
    I have an apex page which is a popup page. I am passing parameters to the applet and then reading them in from my java code.
    Here is my applet code
    <SCRIPT>
      function getStatus(retStatus) {
        $s("P3_MESSAGE", ''||retStatus||'')
    </SCRIPT>
    <APPLET ARCHIVE="/i/bin/offline_load.zip" CODE="offline_load.class"  STATUSMSG WIDTH=0 HEIGHT=0>
    <PARAM name="username" value="&APP_USER.">
    <PARAM name="dbuser" value="&P3_DBUSER.">
    <PARAM name="dbpassword" value="&P3_DBPASSWORD.">
    <PARAM name="dbserver" value="&P0_DBSERVER.">
    <PARAM name="dbport" value="&P3_DBPORT.">
    <PARAM name="dbsid" value="&P3_DBSID.">
    </APPLET>P3_DBUSER, P3_DBPASSWORD, etc are all defined on page zero as hidden and protected items
    My applet code
    public void init() {
        CallableStatement load_stmt = null;
        String userName = this.getParameter("username");
        String dbUser = this.getParameter("dbuser");
        String dbPass = this.getParameter("dbpassword");
        String dbServer = this.getParameter("dbserver");
        String dbPort = this.getParameter("dbport");
        String dbSid = this.getParameter("dbsid");
        try {
          System.out.println("init(): loading OracleDriver for applet created at " + created.toString());
          Class.forName("oracle.jdbc.driver.OracleDriver");
          System.out.println("init(): getting connection");
          conn = DriverManager.getConnection("jdbc:oracle:thin:@" + dbServer + ":" + dbPort + ":" + dbSid, dbUser, dbPass);
        } // end tryThe odd thing is I have gotten this working twice then unexpectedly it just stops working when I make a change to the java applet code.
    And the changes have absolutely nothing to do with the above code it can be anything the first time was error handling I added
    to another section and the second I modified a stored procedure call.
    Anyone have any idea why this might be occurring as this is driving me completely insane :(
    Thanks in advance

    Hi,
    In your init() code, you have a "try" block - do you have a "finally" block to close the connection? Something like:
    finally {
      try {
        conn.close();
      catch (Exception ignore) {
    }Could it be that you have reached the limit of the number of available open connections?
    Your code looks ok as far as I can see (based on examples at: http://www.orafaq.com/wiki/JDBC )
    Also, in your new bits of code, have you added try/catch/finally blocks? Does the code compile fully (ie, no warnings)? Have you added new imports that may conflict with existing code such that you have to fully qualify existing objects/classes (eg, you may now have two DriverManager classes or CallableStatement objects)?
    Andy

  • Issue with passing parameters from JSP to Backing bean

    hi ,
    I have an issue in passing parameters from my JSP to backing bean. I want to fetch the parameter from my URL in backing bean .This is how i am coding it right now. But the parameter companyID returns me null.
    URL http://localhost:8080/admin/compadmin.jsp?companyID=B1234.
    In my backing bean
    FacesContext context = FacesContext.getCurrentInstance();
    String companyID = (String)context.getExternalContext().getRequestParameterMap().get("CompanyID");
         public void setCompanyID(String companyID)
              this.companyID=companyID;
         public String getCompanyID()
              return this.companyID;
    faces-config.xml :
       <managed-bean-name>admincontroller</managed-bean-name>
              <managed-bean-class>com.admin.controller.AdminController</managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
              <managed-property>
                   <property-name>companyadminbean</property-name>
                   <property-class>com.admin.model.AdminBean</property-class>
                   <value>#{companyadminbean}</value>
                         </managed-property>
                        <managed-property>
                                 <property-name>companyID</property-name>
                              <value>#{param.companyID}</value>
                             </managed-property>Please let me know if iam missing something.Appreciate your help in advance
    Thanks

    Thanks very much for your input. I made changes to my bean accordingly. Actually the method getAdminType() is a not a getter of a property. It's just a method which iam calling in AdminController bean constructor to verify whether the person is System Admin or Client admin. So now the issue is inspite of making changes still the link "Copy Users" shows up for Client admin too which is incorrect.
    My Administrator bean:
    public class Administrator {
      boolean GSA=false;
      boolean SA=false;
      public Administrator(){}
    public boolean isGSA()
        return GSA;
      public boolean isSA()
        return SA;
      public void setGSA(boolean value)
        this.GSA=value;
      public void setSA(boolean value)
        this.SA=value;
    }My backing bean:
    public class AdminController {
    private AdminBean adminbean = new AdminBean();
    public AdminController(){
    int userID=1234;
    this.getAdminType(userID);           
    public void getAdminType(int userID)
             Administrator admin = new Administrator();
             if (userID<0) return;
             try{
                 if(Rc.isGlobalSystemAdmin(userID)){
                      admin.setGSA(true);
                              }else if(Rc.isClientSystemAdmin(userID)){
                      admin.setSA(true); // i could see these values setup correctly in the admin bean when i print them
                 adminbean.setAdmin(admin);
                  } catch (Exception e){ }
    Admin Bean:
    public class AdminBean {
    private Administrator admin; 
    public Administrator getAdmin()
                        return this.admin;
              public void setAdmin(Administrator admin)
                        this.admin = admin;
    faces-config.xml
    <managed-bean>
              <managed-bean-name>admincontroller</managed-bean-name>
              <managed-bean-class>com.controller.AdminController</managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
              <managed-property>
                   <property-name>adminbean</property-name>
                   <property-class>com.model.AdminBean</property-class>
                   <value>#{adminbean}</value>
             </managed-property>
         </managed-bean>
         <managed-bean>
              <managed-bean-name>adminbean</managed-bean-name>
              <managed-bean-class>com.model.AdminBean</managed-bean-class>
              <managed-bean-scope>request</managed-bean-scope>
              <managed-property>
                   <managed-property>
                   <property-name>admin</property-name>
                   <property-class>com.model.Administrator</property-class>
                   <value>#{admin}</value>
                             </managed-property>
         </managed-bean>     My JSP:<h:outputLink id="ol1" value="/companyadmin/copyusers.jsp">
               <h:outputText id="ot1" value="Copy Users" rendered="#{adminbean.admin.isGSA}" /><f:verbatim><br/></f:verbatim>
               </h:outputLink>    so now the issue is thelink copy users is displayed even #{adminbean.admin.isGSA} is FALSE. please advise.
    Thanks
    Edited by: twisai on Oct 15, 2009 7:06 AM

  • Passing  parameters from  BSP to BW report

    How to pass parameters from a BSP application to BW in order to execute the BW report

    In BW template
    a different URL is generated for selection made in each input field.
    I have 4 different URL's now.
    and when I push the Execute button a URL is generated which looks incomplete and it does not show all the parameters(  lot of things are happeninng inside like authorizatins, session handling etc).
    The URLS are shown below
    URL genarated when the query is executed in the browser:
    http://coles33.co.lsil.com:1080/SAP/BW/BEX?variable_screen=X&template_id=0QUERY_TEMPLATE&INFOCUBE=ZAMOEMP1&QUERY=ZAIMREP1
    After selecting Location:
    http://coles33.co.lsil.com:1080/SAP/BW/BEX?SAP-LANGUAGE=E&PAGENO=1&CMD_ID=1&REQUEST_NO=0&VAR_VALUE_EXT_2=CA01&F4CMD=FINISHED
    After selecting org:
    http://coles33.co.lsil.com:1080/SAP/BW/BEX?SAP-LANGUAGE=E&PAGENO=1&CMD=PROCESS_VARIABLES&INDEX=3&VAR_VALUE_HELP_SET_LINE=3&REQUEST_NO=0&VAR_VALUE_HELP_SET_5=5
    After pushing Insert:
    http://coles33.co.lsil.com:1080/SAP/BW/BEX?SAP-LANGUAGE=E&PAGENO=1&CMD=PROCESS_VARIABLES&REQUEST_NO=0&CMD=PROCESS_VARIABLES&SUBCMD=VAR_NEW_LINES&VARID=WNTEST1%200001
    After making second selection for org:
    http://coles33.co.lsil.com:1080/SAP/BW/BEX?SAP-LANGUAGE=E&PAGENO=1&CMD=PROCESS_VARIABLES&INDEX=4&VAR_VALUE_HELP_SET_LINE=4&REQUEST_NO=0&VAR_VALUE_HELP_SET_15=15
    After selecting FLSA:
    http://coles33.co.lsil.com:1080/SAP/BW/BEX?SAP-LANGUAGE=E&PAGENO=1&CMD_ID=2&REQUEST_NO=0&VAR_VALUE_EXT_5=EX&F4CMD=FINISHED
    after selecting date:
    NO URL GENERATED
    After pushing Execute:
    http://coles33.co.lsil.com:1080/SAP/BW/BEX?SAP-LANGUAGE=E&PAGENO=1&CMD=PROCESS_VARIABLES&REQUEST_NO=0&CMD=PROCESS_VARIABLES&SUBCMD=VAR_SUBMIT&VARID=
    I am not able to understand how to call this url from BSP page.( I also have multi-selection for location and org)
    regards
    Aditya

  • Pass parameters from JSP Dyn Page to WDJ Application

    Hi,
    I am trying to pass parameters from my JSPDyn Page to WDJ Application.
    I am using NWDS 7.1 EHP1
    My code is :
    function to_WEBDYNHK()
          EPCM.relaxDocumentDomain();
          EPCM.doNavigate
        ('ROLES://pcd:portal_content/Himanshu.Himanshu/TestDynUIApp?DynamicParameter="hkparam%3Dqwertyuio"');
    This method is being called on click of a button.
    hkparam is the parameter in question.
    The JSPDyn page is an iView and the WDJ application is a page and both have been assigned to a role.
    In the properties of the WDJ Page, I have removed DymanicParameter from "Do not Forward These Parameters To Web Dynpro" property.
    However I am getting null as the value of hkparam in my WDJ application.
    The code used is :
    IWDRequest request = WDProtocolAdapter.getProtocolAdapter().getRequestObject();
           String param1= request.getParameter("hkparam");
    What seems to be missing here.
    Please help.
    I went through the documentation on SDN but it does not seem to help.
    TIA,
    Himanshu

    Hi Himanshu,
    Try this code.
    EPCM.doNavigate("ROLES:portal_content/Himanshu.Himanshu/TestDynUIApp?hkparam=Dmypass1123")
    if the parameter is hkparam and the value to be passed is Dmypass1123. You need not change any design time property of the WD page, and WDProtocolAdapter should retrive the parameter.
    Regards,
    Vishweshwara P.K.M.

  • How can I pass parameters from one process flow to another process flow?

    How can I pass parameters from one process flow to another process flow (sub process) in warehouse builder? let me know the steps I have to do in warehouse builder.
    Thanks in advance,
    Kishan

    Hi Kishan,
    Please post this question to the Warehouse Builder forum:
    Warehouse Builder
    Thanks, Mark

  • Passing Parameters from One Screen to Another Screen

    Hi All,
    I need to Pass Parameters from one Module Pool Screen to Another Screen.
    I have two Parameters in First screen. I don't want to use <b>Export and Import</b>
    The first screen record should sit in the Second Screen as it is.
    Please suggest me.
    Thanks and Regards,
    Prabhakar Dharmala

    An Idea,
    Create a function group, in that define global variables. Then create two function module. Pass variable from one function module and get in the another one.
    Hope this will help you to solve. If you need further help I will create and sent you a test code.
    Darshan.
    <i><b>Pl. Reward points to the helpful answer, it motivates us to answer more </b></i>

  • Passing parameters to an applet dynamically

    I am looking for suggestions on how I can pass parameters to my applet which generates a simple bar graph. If I pass parameter names and values using HTML tags the number of bars are fixed. I want my applet to accept variable number of values for the x and y axes.

    Then use a JSP for the HTML page. This can then pass dynamically generated numbers as params. Alternatively, your applet could communicate to the server through a Socket (package java.net) - although this can cause problems if there are firewalls inbetween client and server.

  • Passing parameters to my applet on apex

    i cannot seem to pass parameters to my applet which i embedded on my apex region. can anyone help.

    We probably can't help without more information, details and perhaps and example to look at.

  • Passing parameters from shell script to OWB process flow

    Hi all,
    I am running OWB process flow (using the template script provided by oracle) and i want to pass two date parameters as shown below:
    sqlplus -s $SQL_USER/$SQL_PWD@$ORACLE_SID @$HOME_DIR/src/vmc_oem_exec_script.sql OWB_OWNER VMC_POST_DW_PF_LOC_SIT PROCESS VMC_NM1_PORT_MAIN "," "P_DATE_FROM=$DATE_FROM,P_DATE_TO=$DATE_TO"
    How do i catch those values in process flow and pass those to mappings in Process flow?
    Do i need to create PF variables with same names or any name will do?
    Thanks in advance

    This document is explaining how to pass data between activities in process flow.
    I am passing parameters from a shell script.
    Any ideas,how to pass parameters from shell script and then initialize the process flow variables based on those values and then pass them further to mappings.
    Thanks

Maybe you are looking for

  • HP 6150 unable to print black

    Can someone please send me by private message reset instructions with printer off. I have already done the reset with pulling out power cord, as well as the one from support menu with no luck. I presume there is a third reset that cannot be posted he

  • Parent key is not found , SQLException

    Hello, I have simple master -details relations , those are used ion the same page of the application, in the normal situation, upon commit first INSERT for the master table is executed, then Insert of the details tables, but in only one scenario an I

  • Iphone 5 ships with iOS 6.0.1

    hi all! i just bought an iphone 5 in bangladesh. here there's no apple store or authorised retailer. so we have to buy iphone from third party. after i unboxed the phone, i noticed that the phone comes with iOS 6.0.1. i've already updated it to iOS 6

  • How long for Raid 5 to rebuild?

    I have a 2ghz g5 xserve with PCI-raid card installed. My raid 5 consists of 3 250ghz drives. The system is not being used at this time because I have a backup server running. My question is how long can I expect this process to take? Its been runnnin

  • Regarding ports opening for patching client machine in DMZ.

    Hi , Regarding SCCM patching to Client Machine on DMZ. I have SCCM server and WSUS server both are different machines.My software update point is configured to port 8530. I have a client machine in DMZ and want to do patching for the DMZ machine. Por