How to passing object to the applet?

Dear All,
My project is needed to read the xml file (include the form content) and then parse the xml file to create the related object, so using the applet to display this dynamic form.
Due to cannot directly open the file object and the applet, the following is my idea:
1. ) In the servlet, first to new the fileinputstream object , then pass the object into the applet. But this idea is not allowed.
Only String value can use the param to to pass the parameter value to the applet using <param name = \"cis_auditID\" value = \""+inputsource+"\">.
2. ) Firstly , read the file and then create specific object before call applet class. I know some people said that using the URLConnection, but i don't know for this. Can only one give more detail description about that.
So how can i pass the fileinputstream or the own created object into the applet?
Urgent! Please help!

Where is the xml file located??
If it's on the same server that serves the applet or if it's dynamically generated
by making a http request to a servlet you should use URL and URLConnection.
URL u = new URL(this.getCodeBase(),"../relativeDir/xmlFile.xml");
URLConnection uc = u.openConnection();
InputStream = uc.getInputStream();
// read the rest of the struff.
You might want to take a look at this example if you want to send (POST data) to
the server when you make a http request to a servlet:
http://forums.java.sun.com/thread.jspa?threadID=645830&tstart=0
3rd post

Similar Messages

  • Passing objects to a applet.

    hi there,
    i have a jsp and a applet. i need to pass an object from my jsp to the applet and the applet will present the results.
    how can i do it?? how do i pass objects to the applet??
    thanks

    you typically pass strings as applet parameters in the page.
    otherwise, you have your applet connect back to the server with a socket or URLConnection to a servlet, which can send serialized objects if that's what you need, or other data.

  • How to pass parameter to the Query String of the Named Queries'SQL

    Firstly to say sorry,I'm a beginner and my English is very little.
    Now I want to know
    How to pass parameter to the Query String of the Named Queries'SQL in the Map editor.
    Thanks.

    benzi,
    Not sure if this is on target for your question, but see #5 in the link below for some web screencasts that show how to pass an input text form field value to the bind variable of a view object. If you're looking for something different, maybe provide some more details such as what you are trying to accomplish and what technology stack you are using - for example, ADF BC, JSF, etc.
    http://radio.weblogs.com/0118231/stories/2005/06/24/jdeveloperAdfScreencasts.html
    Also see section 5.9 and chapter 18 in the developer's guide.
    thanks

  • How to pass UserID to the view object after authentication?

    Hi,
    I am developing an application using Oracle JHeadstart 10.1.3 Version 10.1.3.0.83
    I have a view where all clients' data are. But when a client logs in he/she should see only his/her data, he/she should not see other clients' data.
    So after logging how I can pass his/her UserID to the view? We are planning to use the OID for authentication. So when the client logs in with his/her user id, I want to pass that user id to the view so that the view query will return only the records associated with that client.
    Any help would be appreciated
    Thanks
    Syed

    Syed,
    Although not fully documented yet in the Devguide, 10.1.3 still ships with basically the same security code that we had in 10.1.2. I suggest reading the security section in Chapter 5 of the 10.1.2. Devguide to get an idea of how that would work. Basically, it boils down to setting a JhsUser object on the session that you can access in the Model through the JhsApplicationModuleImpl.getUser() method.
    Using the user in a whereclause could be done programmatically by altering the whereclause of a VO on the "executeQueryForCollection" method, but you could also use a bind variable and then bind it to the JhsUser object on the session through an EL expression like #{jhsUser.displayName}
    Hope this helps,
    Peter Ebell
    JHeadstart Team

  • How could I pass object to the other object

    Hi,
    How could I pass an object to the new initializing object, so that I can reference to the first object later?

    You mean something like
    MyClass1 myclass1 = new MyClass1();
    MyClass2 myclass2 = new MyClass2(myclass1); // <-- myclass1 is being passed to the constructor of myclass2                                                                                                                                                                                                                                                                                                                                                       

  • How to pass values of the prompt through Action Link - URL in 11g

    Hi All,
    I am in OBIEE 11g v6.
    Let's say, I have two dashbaord pages P1 and P2.
    P1 page contains
    1. Prompt PR1 - containing a single column EmpName
    2. Report R1
    P2 page contains
    1. Prompt PR2 - containing a single column EmpName (same column as in PR1)
    2. Report R2
    Requirement :
    Let's say a user select a value = David from the EmpName column in prompt PR1. In the Report R1, on one the measure columns 'Sales', I am using an action link - Navigate to URL ( I can't use Navigate to BI Content for some reasons). In the URL, I am giving the URL to page P2. Can I pass the selected value (which is David) to the EmpName column of the Prompt PR2 of Page P2 so that Report R2 is automatically limited by David when I land on that page through the URL?
    Few things to consider are, I can't use EmpName column in my report R1 on page P1, I just want to pass the value of a common column from one prompt on Page1 to another prompt on Page2. Is that possible. Can anybody please help?
    Thanks,
    Ronny

    Hmm can you give a try one more time with
    Add EmpName name and hide it on report R1 on page P1
    and set EmpName as Is Prompted on report R2 on page P2 and with my earlier steps should work.
    Other option is read this doc once that helps you how to pass value thru url.
    http://docs.oracle.com/cd/E21043_01/bi.1111/e16364/apiwebintegrate.htm#z1005224
    You need to have a EmpName as Is Prompted on report R2 on page P2
    If helps pls mark

  • How to pass value to the  FM 'HR_MAINTAIN_MASTERDATA' .

    Dear Experts,
    How can I pass values to the FM 'HR_MAINTAIN_MASTERDATA' to create pernr?
    In the PROPOSED_VALUES tables I am passing the values for infotypes and subinfo types.
    The values are picked up for infotypes with no subtype , but for infotypes with more than one subtype the values are not getting passed.
    I am getting an error message 'Fill in all required entry fields' for the second subtype's mandatory field.
    I am trying to update Address (Infotype 6) with subtypes 1 and 5.
    Regards,
    Basavaraj Patil

    please try to create one manually with subtype 5 i.e second sub type
    Go to pa30
    select subty 5
    and try create record manually
    it will enable that what are the manual fields fill those fileds
    I belive you must missing city field or pin
    Please check make wht fields are needed and give those fields
    Best Regards

  • How to access objects in the Child Form from Parent form.

    I have a requirement in which I have to first open a Child Form from a Parent Form. Then I want to access objects in the Child Form from Parent form. For example, I want to insert a record into a block present in Child Form by executing statements from a trigger present in Parent Form.
    I cannot use object groups since I cannot write code into Child Form to first create object groups into Child Form.
    I have tried to achieved it using the following (working of my testcase) :
    1) Created two new Forms TESTFORM1.fmb (parent) and TESTFORM2.fmb (child).
    2) Created a block named BLK1 manually in TESTFORM1.
    3) Created two items in BLK1:
    1.PJC1 which is a text item.
    2.OPEN which is a push button.
    4) Created a new block using data block wizard for a table EMPLOYEE_S1. Created items corresponding to all columns present in EMPLOYEE_S1 table.
    5) In WHEN-NEW-FORM-INSTANCE trigger of TESTFORM1 set the first navigation block to BLK1. In BLK1 first navigable item is PJC1.
    6) In WHEN-NEW-ITEM-INSTANCE of PJC1, code has been written to automatically execute the WHEN-BUTTON-PRESSED trigger for the "Open" button.
    7) In WHEN-BUTTON-PRESSED trigger of OPEN item, TESTFORM2 is opened using the following statement :
    open_form(‘TESTFORM2',no_activate,no_session,SHARE_LIBRARY_DATA);
    Since its NO_ACTIVATE, the code flows without giving handle to TESTFORM2.
    8) After invoking OPEN_FORM, a GO_FORM(‘TESTFORM2’) is now called to set the focus to TESTFORM2
    PROBLEM AT HAND
    ===============
    After Step 8, I notice that it passes the focus to TESTFORM2, and statements after go_form (in Parent Form trigger) doesnot executes.
    I need go_form with no_activate, similar to open_form.
    Edited by: harishgupt on Oct 12, 2008 11:32 PM

    isn't it easier to find a solution without a second form? If you have a second window, then you can navigate and code whatever you want.
    If you must use a second form, then you can handle this with WHEN-WINDOW-ACTIVATED and meta-data, which you have to store in global variables... ( I can give you hints if the one-form-solution is no option for you )

  • How to pass argument to the Java Plugin JVM w/o using the Control Panel?

    I want to deploy an applet to be loaded by the Java Plug In
    and fix some settings of its Java Virtual Machine.
    The JPI Control Panel offers two ways to pass arguments to the JVM,
    none satisfactory.
    1. while interactive via the Control Panel Window.
    This cannot be a solution for a deployed applet.
    or
    2. by editing the system generated file that stores
    the settings of the Plugin Control Panel, using a property
    named javaplugin.jre.params.
    The problem with this method is that if forces to access
    and edit this property file which is stored at various locations
    depending the client platform. Then, it may collide with other
    settings for other applets.
    Is there a way to pass the arguments to the JVM
    from within the html file?
    Has anyone found a solution to this question?
    JPS

    I am interested in this issue as well.
    Did anyone find a reliable way to specify the runtime parameters that should be used by the Java Plug-in in order to execute a given Java applet?
    I believe a good place to specify these runtime parameters would be the applet's JAR manifest: only digitally signed applets should be able to set the desired runtime parameters...
    Any comments / suggestion would be greatly appreciated.
    Regards,
    Marco.

  • How to align object in the report layout

    Hello,
    I find it very difficult to aligin objects in the report editor or in the template editor. I know there are some alignment options, like aligning to the grid or aligning a group of objects, but they seem to work on the bounding rectangle for the object. For my text objects, those rectangles are arbitrarily sized. So aligning those rectangles does not correctly align the text baseline, for example.
    Does anyone have a tip on how you can align objects? I there maybe a way to alter the size of objects by changing a number in a property sheet somewhere?
    Regards,
    Frans

    The problems I am having now occur when I am editing the margin in the template editor. For some reason, the flex and confine options can not be turned off in the template editor. I believe they are turned on in this mode, at least in tools:options: paper layout they are turned on. But anyway, this really does not matter because I don't have nested objects in the margin. The objects that will go flying off are completely unrelated to the object I want to move or resize.
    Update: I have just tried editing the layout of a report that was based on the template I am working on. Turning flex off there had a positive effect. It seems indeed the 'flex' setting is to blame for the problems I am experiencing. Thanks for the tip!
    So now I would really like to know how to turn of flex in the template editor..

  • How to pass value from the jsp file to a java bean

    I have huge promblem .I want to pass value of combo box to bean file to set my database contecting.The is how i call function to pass database to the bean file
    <%db.setDatabase(database);%>are coding to set my databse connection
    private String database;
        public Conn(){
         try{
                   Class.forName("org.gjt.mm.mysql.Driver");
                   DriverManager.registerDriver((Driver) Class.forName("org.gjt.mm.mysql.Driver").newInstance());
                   String data=getDatabase();
                   String url = "jdbc:mysql://localhost/"+data;
                   Connection conn = DriverManager.getConnection(url);
                   setConnection(conn);
              catch(SQLException e){
                   System.out.println(e.toString());
              catch(Exception e){
                   System.out.println(e.toString());
         public void setDatabase(String Database){
          this.database = Database;
         public String getDatabase(){
         return this.database;
         }     and Below are error produce
    Note: sun.tools.javac.Main has been deprecated.
    /mrs/system_menu.jsp:18: Method setDatabase(java.lang.String) not found
    in class bgoc.dbConn.Conn.
    db.setDatabase(database);
    ^
    1 error, 1 warning
    please help me soon. any that come to your will help
    thank you

    I have huge promblem .I want to pass value of combo box to bean file to set my database contecting.The is how i call function to pass database to the bean file
    <%db.setDatabase(database);%>are coding to set my databse connection
    private String database;
        public Conn(){
         try{
                   Class.forName("org.gjt.mm.mysql.Driver");
                   DriverManager.registerDriver((Driver) Class.forName("org.gjt.mm.mysql.Driver").newInstance());
                   String data=getDatabase();
                   String url = "jdbc:mysql://localhost/"+data;
                   Connection conn = DriverManager.getConnection(url);
                   setConnection(conn);
              catch(SQLException e){
                   System.out.println(e.toString());
              catch(Exception e){
                   System.out.println(e.toString());
         public void setDatabase(String Database){
          this.database = Database;
         public String getDatabase(){
         return this.database;
         }     and Below are error produce
    Note: sun.tools.javac.Main has been deprecated.
    /mrs/system_menu.jsp:18: Method setDatabase(java.lang.String) not found
    in class bgoc.dbConn.Conn.
    db.setDatabase(database);
    ^
    1 error, 1 warning
    please help me soon. any that come to your will help
    thank you

  • How to pass parameter to the method in EJB session bean from Managed Bean

    Hi,
    I need some guidance in accessing the EJB session bean methods from one of my backing Bean. I use EJB 3.0 Entity Beans and EJB Session Beans. I have to get value from my page and pass it thro the backing bean to the respective EJB session bean. I have no clue of how to do this,
    When i click a command link on the page, in its backing bean click method, i am able to get a value and store in a variable under its click action. But from there i am not knowing of how to pass it as a variable to the EJB session bean and hence execute the query(this is where we have to pass the variable as a parameter in its where clause) in the entity bean.
    I wanna know how to make a call to the EJB session bean and from there execute the Enitity bean.
    Guide me regarding this....
    Thanks
    ri

    Unfortunately dependency injection doesn't work for jsf backing beans, so you have to use a normal jndi lookup to find your session bean. The following example shows you how to find a session bean and call a method:
    public void commandButton_actionListener(ActionEvent actionEvent) {
    Context ctx;
    try {
    ctx = new InitialContext();
    helloWorldEjb = (HelloWorldEJB)ctx.lookup("HelloWorldEJB");
    hello = helloWorldEjb.sayHello(name);
    System.out.println(hello);
    } catch (NamingException e) {
    e.printStackTrace();
    }

  • How to pass parameters to the list of ESS Jobs that are in a Job Set?

    All,
    Oracle Fusion Application Version: 11.1.7.0.0
    I am new to Fusion Apps (I was ADF Developer before this), got some hands on with Fusion Application. Need some help/guidance related to ESS Job. I have 2 custom ESS Job created (1st of type Sql Plus to query and spool the result into a file into local server and 2nd of type host script that accesses the spooled file and sends it to destination server). I've put these two job together in a Job set (Serial execution) and it works fine.
    Requirement:
    Whenever the Job set is executed, generated file should be appended with System Date and Time. Following are the two ways that are coming into my mind to achieve this.
    Way 1. First job has to read the systimestamp (in desired format) from DB, do actual query execution, spool the resultset into a file named with time stamp details, place it in a local directory. As a part of completion of the 1st Job, 1st Job has to pass this systimestamp value to the 2nd Job (How?) so that it can pick the right file from local directory for its work.
    Way 2. We should be able to create parameters at Job Set level (and this too should not be a constant value but dynamic, say sysdatetime) so that both the job can access this value.
    Though I am getting some thought on how the communication between these two jobs should be happened, I don't know whether they are possible, if so, how to do.. Can anybody suggest? Your help would be appreciated!

    Is the timestamp used in the processing other than uniquely identify the file ? If it is then do note that you may need to take into account timezones, slight differences in the time etc. in your processing  If not you could potentially use the request identifier or some other unique identifier instead.
    In any case you can pass information between the jobs; for details refer to:
    Defining and Using Job Sets Supporting Input and Output Forwarding in Job Sets
    Using Parameters and System Properties
    Using System Properties
    SystemProperty (Oracle Enterprise Scheduler Service API Reference)
    So depending on your requirements you could define job set step parameters, input / output forwarding or name value pairs on the ENVIRONMENT_VARIABLES system property.
    Jani Rautiainen
    Fusion Applications Developer Relations
    https://blogs.oracle.com/fadevrel/

  • How to pass session info to applet?

    Hi all,
    Is it possible to pass a browers' session id to applet in Tomcat server? I've known that an applet can get a session info from brower.
    Howserver, since I can't chage a applet code I want to modify Tomcat server to maintain session.
    Is there any suggestions?
    thanks.

    The Servlet will normally communicate the session id with a web client (e.g., browser) via cookies. A random session UID is generated and associated with a given client's session. The id is sent back to the client via the http-header set-cookie. On subsequent requests, the browser will include the cookie http-header containing the UID. Some implementations may opt to store the session UID in a hidden form field, though this is less common.
    I'm not sure where the applet is in your architecture. However, if you send and receive HTTP messages, you should be able to store the id and ensure that you send your own requests to the Servlet with the appropriate cookie http-header.
    - Saish

  • How to pass values for the checkbox

    Hi all,
    We all have seen the functionality of selecting a check box and then click the button and it performs the task(i.e in the hotmail when you select a line/lines by selecting the checkbox for that line and click the delete button those all mails are deleted). we are trying to implement this functionality. I have written the following code for that, but i get the values for the selected box if the box is the first one but if I did not select the first line and select the second line, i get the values for first line as well as for the secondline separated by comma . In other word it concatinates all values. Can I have some pointers?
    <INPUT TYPE="CHECKBOX" NAME="selectedBoxes" UNCHECKED value=<%out.println(" \"" + boxValues + "\" ");
    And also I don't know how to use the oncheck event for the check box...
    Thanks in advance...
    Ameeta

    Thanks Kan,
    But I am littlebit confuse about how does multiple values have been passed. For Example, i have selected 3 check boxes to delete the record. The value for each check box I need is name, event and hours...Each of these record is separated by '*'. I have three sets of values...for three records..
    1) Ameeta*overTime*5.00
    2) Ameeta*holiday*6.00
    3) Ameeta*weekends*8.00
    I have total 5 or 6 records for this person(Ameeta) and I want to delete these listed three...some how if I use the following coding it gives me all records before the last checked box...
    while(rs1.next())
    isEmpty = false;
    eventType = rs1.getString("EVENT_TYPE" ) ; ;
    eventDate = rs1.getString("EVENT_DATE" ) ;
    hours = rs1.getString("HOURS" ) ;
    hash += Double.parseDouble(hours) ;
    boxValues += eventDate + "*" + hours + "*" shortEvents "#";
    userId = rs1.getString("USER_ID" ) ;
    // employeeId = rs1.getString("EMP_ID" ) ;
    confirmFlg = rs1.getString("CONFIRM_FLAG");
    // out.println("\nrecordQuery:\n" + recordQuery ) ;
    %>
    <tr>
    <td colspan=5 width=100>
    <INPUT TYPE="CHECKBOX" NAME="selectedBoxes" value=<%out.println(" \"" + boxValues + "\" "); %>>
    <td width="150"><%=eventDate%></td>
    <td width="150"><%=eventType%></td>
    <td width="150"><%=hours%></td>
    <td width="150"><%=location%></td>
    <td width="150"><%=confirmFlg%></td>
    </tr>
    **************************************In this code basically I am concatinating so it is obvious that I get every thing before the check box..so I did the following change by adding the line below in the code
    while(rs1.next())
    boxValues = "";
    everything else is same....
    but now I get only the last one that is true too because I am asigning it to the null but I don't know how to pass all checked one.........can anybody help me?      
    Thanks in advance...
    Ameeta

Maybe you are looking for

  • S-Video Output, FCP & PB 17"

    Hi I've got a new 17" Powerbook, with FCPHD. Is it possible to get playback of my sequence to a Television using the S-Video port on my Powerbook? Cheers!

  • OWB9i as Data Modelling tool

    I was told that OWB9i can also be used as Data Modelling tool. Assume we had developed DWH using Bus Architecture. Now How can I see the entire scehma that contains all Facts and Dimensions with their attributes and measures with primary key and Fore

  • Merge Statement in Oracle

    I have two tables.Table 1 and Target. I am using Table 1 as source to update records in target table. I am joining the two tables on common column named ID. Datatype for ID in table 1 is VARCHAR whereas it is NUMBER in target table. Also, Updatedate

  • TS3899 Why don't I receive notification of emails  by sound or number on my email icon

    I no longer receive a number on my email icon to alert me on mail delivered to me. If I open my emails the number of mail received is there and then the notification alert sounds.

  • Importing smart card certificates

    Has anyone run into any issues similar, where you cannot import the smart card certificates into the BlackBerry? Users have T-Mobile 8700g and the RIM Bluetooth smart card reader. We are able to pair the BB and the Reader. But we are stuck at the poi