How to get data passed back to server from Web Start client ?

dear experts,
my web application allows users to launch a web start window from the jsp page, after users enters some data in the web start page and press "OK", the data entered should be passed back server for process. i just have not much clue how to do this....
thanks.

Use the java networking library to send a request to a url that takes the arguments you want to pass in.
Example:
URL url = new URL("http://yourserver/yourhandler.do?arg1=foo&arg2=bar");
HttpURLConnection conn = (HttpURLConnection) URL.openConnection(url);
... any output testing, etc...
conn.disconnect();It's not the prettiest, but it ought to get the job done.
You should probably (at least) use the BasicService to get the codebase back to the server that served up the jnlp file.
-Mike

Similar Messages

  • How to get  data with the raw pattern from resultset ?

    would you tell me how to get data with the raw pattern from resultset ?
    thank you in advance!
    longgger2000

    I tried getBytes() and getObject()
    , but I can not get the right result , for example the
    data in oracle database is 01000000DFFF, when In used
    the method of getBytes() and getObject(), I get the
    result of [B@1c2e8a4, very different , please tell me
    why !
    thank you
    longgger2000
    [B is byte arrayseem that it return an bytes array for you.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to get the user input while server is waiting for client's message

    I have a server/client program (using sockets)
    I used a thread to let a server always waiting for client's request, but how should I found that
    there is no message pass to server from client.
    public void run(){
    while (true){
    Socket server = serverP.accept();
    ObjectInputStream inFromClient = new ObjectInputStream(server.getInputStream());
    inMessage = (Message)inFromClient.readObject();
    System.out.println("Deadlock may occurred, please enter your command: ");
    BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in));
    String command = inFromUser.readLine();
    The server is waiting for the inMessage that is passed from multiple clients. But if the server
    received no message after some time, it will assume something is wrong (eg, there is a
    deadlock), then it will ask the user to input the command to execute the method.
    If I put
    "System.out.println("Do you want to take Snapshot: ");
    BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in));
    String command = inFromUser.readLine();"
    inside the while loop, it will keep asking user to enter the input when every time the client
    connect to the server. But I want to ask the user to enter the command only when the server
    can't get the response from clients.
    How should I do?
    Please help.

    Your statement:
    Socket server = serverP.accept();
    it will block until Server receive connect request from client.
    So, what u can do is, create a seperate Thread which check if server is idle (no client connect to it) for a certain time.
    public class xxxxx extends Thread {
    public void run(){
       (new WatcherThread()).start()
       while (true){
       Socket server = serverP.accept();
       WatcherThread.acceptFlag();  
       ObjectInputStream inFromClient = new ObjectInputStream(server.getInputStream());
       inMessage = (Message)inFromClient.readObject();
       Do something with client request ...
       I suggest you to create a WorkerThread for
       each client request.
       For example:
       new (WorkerThread(inMessage)).start();
       This way, your server thread will immediately serve
       the next client request ASAP.
    public class WatcherThread extends Thread {
       private static accept = false;
       public static void acceptFlag() {
            flag = true;
       public void run() {
           while(true) {
               try { sleep(10000); } catch (Exception ex) { }
               if (!accept) { // never accepted after 10000 msecs
                  ... do your System.in here ...
               flag=false;          
    }The idea is, your server notify WatcherThread if a client connect. WathcerThread runs at seperate thread. It waits for 10000 msecs and check if Server ever gets connect request from server. If it doesn't then you can do your System.in, otherwise, it will wait for 10000 again..
    FYI, next time, please use [ code ] and [ / code ] to format your code. It discourage me to read plain whole-left-aligned code like yours.
    See: http://forum.java.sun.com/features.jsp#Formatting
    rgds,
    Alex

  • How to access the C# file in server from Lightswitch HTML Client

    Hi,
    In that LightSwitch HTML Application i have some c# file in the server project.How can i access those C# file in the screens (HTML Client project )
    thanks,
    goblalakrishnan s
    gobalakrishnan S

    Hi,
    with implementing Generic File Handlers (.ashx)
    See follow link:
    http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/174/Full-Control-LightSwitch-ServerApplicationContext-And-Generic-File-Handlers-And-Ajax-Calls.aspx
    regards
    j.nord

  • 2 way communication - talk to server from web start app and vice versa

    I want to send status messages between my web start application and services running on the web server computer. I havent been able to find any examples on this. Can I communicate over http? Do I need to set up a separate connection to a port and communicate on my own? any ideas on how to do this?
    thanks

    ''Roland Tanglao [[#answer-698502|said]]''
    <blockquote>
    Hi scruffy90:
    You wrote "LG G2 and Samsung Galaxy Note 3. Both on Android 4.4.2 Firefox for Android Ver. 35.0.1 "
    I just tried switching between HSPA+ aka 3G and WiFi on a Galaxy S5 running Android 5 and have had no issues but I think this may have been an issue in the past (I did a search for a bug in bugzilla.mozilla.org but couldn't find anything).
    Are there any other details you could provide that could help us debug?
    e.g.
    # Are you using a proxy?
    # Who is your WiFi provider?
    # Have you tried other WiFi (e.g. the Wifi both at home and work)
    Cheers!
    ...Roland
    </blockquote>
    Hello Roland,
    No proxy on the phone or wi-fi network.
    My ISP is Time Warner, but I supply my own router (Linksys e4200)
    And this happens on every wi-fi network, at home and away from home.

  • How to get data in the remote system from local system.

    Hi everybody,
    I have developed four classes.
    FileInterface.java:-
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    public interface FileInterface extends Remote {
    public byte[] downloadFile(String fileName) throws
    RemoteException;
    FileServer.java:-
    import java.io.*;
    import java.rmi.*;
    public class FileServer {
    public static void main(String argv[]) {
    if(System.getSecurityManager() == null) {
    System.setSecurityManager(new RMISecurityManager());
    try {
    FileInterface fi = new FileImpl("FileServer");
    Naming.rebind("//10.161.15.219/FileServer", fi);
    } catch(Exception e) {
    System.out.println("FileServer: "+e.getMessage());
    e.printStackTrace();
    FileImpl.java:-
    import java.io.*;
    import java.rmi.*;
    import java.rmi.server.UnicastRemoteObject;
    public class FileImpl extends UnicastRemoteObject
    implements FileInterface {
    private String name;
    public FileImpl(String s) throws RemoteException{
    super();
    name = s;
    public byte[] downloadFile(String fileName){
    try {
    File file = new File(fileName);
    byte buffer[] = new byte[(int)file.length()];
    BufferedInputStream input = new
    BufferedInputStream(new FileInputStream(fileName));
    input.read(buffer,0,buffer.length);
    input.close();
    return(buffer);
    } catch(Exception e){
    System.out.println("FileImpl: "+e.getMessage());
    e.printStackTrace();
    return(null);
    FileClient.java:-
    import java.io.*;
    import java.rmi.*;
    public class FileClient{
    public static void main(String argv[]) {
    if(argv.length != 2) {
    System.out.println("Usage: java FileClient fileName machineName");
    System.exit(0);
    try {
    String name = "//" + argv[1] + "/FileServer";
    FileInterface fi = (FileInterface) Naming.lookup(name);
    byte[] filedata = fi.downloadFile(argv[0]);
    File file = new File(argv[0]);
    BufferedOutputStream output = new
    BufferedOutputStream(new FileOutputStream(file.getName()));
    output.write(filedata,0,filedata.length);
    output.flush();
    output.close();
    } catch(Exception e) {
    System.err.println("FileServer exception: "+ e.getMessage());
    e.printStackTrace();
    After that when i compile classes when i give the command as
    rmic FileImpl
    in command prompt error is coming like this.
    error: Class FileImpl not found.
    *1 error*
    Can anyone help me please,urgent.

    It is generating stub and skeleton classes but when iam running FileClient after starting rmiregistry,it is coming something like
    FileServer exception: FileServer
    java.rmi.NotBoundException: FileServer
         at sun.rmi.registry.RegistryImpl.lookup(RegistryImpl.java:106)
         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)
         at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
         at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:343)
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at java.rmi.Naming.lookup(Naming.java:84)
         at FileClient.main(FileClient.java:9)
    Can u help me

  • How to get data in WDDINIT method

    hi...
    how to get data passed through url in WDDINIT method, ... the data is comming in the inbound plug, but plug is executed after WDDINIT...
    thank you.

    Hello Kailash,
    By saying that your data comes in through Inbound Plug itself means that that is the point of access for the data. If there is some standard data, that you can provide through WDDOINIT (e.g. initilizations) but in case of navigation, plugs and events are the only way to send data.
    Hope this helps.
    Regards,
    Neha

  • How to Select data using same column name from 3 remote database

    Hi,
    Can anyone help me on how to get data with same column names from 3 remote database and a single alias.
    Ex.
    SELECT *
    a.name, b.status, SUM(b.qty) qantity, MAX(b.date) date_as_of
    FROM
    *((table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)a,*
    *(table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3)b)*
    WHERE b.dept = 'finance'
    AND a.position = 'admin'
    AND a.latest = 'Y' AND (b.status <> 'TRM') AND b.qty > 0;
    GROUP BY a.name, b.status ;
    NOTE: the bold statements is just an example of what I want to do but I always gets an error beacause of ambiguous columns.
    Thanks in advnce. :)
    Edited by: user12994685 on Jan 4, 2011 9:42 PM

    user12994685 wrote:
    Can anyone help me on how to get data with same column names from 3 remote database and a single alias.Invalid. This does not make sense and breaks all scope resolution rules. And whether this is in a single database, or uses tables across databases, is irrelevant.
    Each object must be uniquely identified. So you cannot do this:
    select * from (table1@remotedatabase1, table1@remotedatabase2, table1@remotedatabase3) a3 objects cannot share the same alias. Example:
    SQL> select * from (dual, dual) d;
    select * from (dual, dual) d
    ERROR at line 1:
    ORA-00907: missing right parenthesisYou need to combine the objects - using a join or union or similar. So it will need to be done as follows:
    SQL> select * from (select * from dual d1, dual d2) d;
    select * from (select * from dual d1, dual d2) d
    ERROR at line 1:
    ORA-00918: column ambiguously definedHowever, we need to have unique column names in a SQL projection - so the join of the tables need to project a unique set of columns. Thus:
    SQL> select * from (select d1.dummy as dummy1, d2.dummy as dummy2 from dual d1, dual d2) d;
    DUM DUM
    X   X
    SQL> I suggest that you look closely at what scope is and how it applies in the SQL language - and ignore whether the objects referenced are local or remote as it has no impact to fundamentals of scope resolution.

  • How to get Date Format from Local Object.

    Hi All,
    I am new to Web Channel.
    I need to know Date format From date of locale.
    suppose there is a date "01/25/2010" date in date field I want to get string "mm/dd/yyyy". Actually I have to pass date format to backend when I call RFC. 
    Is there any way to get Date format from "Locale" object. I should get date format for local object
    I get local object from "UserSessionData" object but how to get Date format from it.
    I am not looking for Date value. I am looking for current local date format ("mm/dd/yyyy or dd/mm/yyyy or mon/dd/yyyy) whatever local date format.  I could not find example which show how to get date format from "Locale" object.
    Any help will be appreciated with rewards.
    Regards.
    Web Channel

    Hi,
    You can get it from "User" or "Shop" business object.
    Try to get User or Shop Business Object as shown below.
    BusinessObjectManager bom = (BusinessObjectManager) userSessionData.getBOM(BusinessObjectManager.ISACORE_BOM);
    User user = bom.getUser();
    char decimalNotation = user.getDecimalPointFormat().getGroupingSeparator();
    If you are seeing "1,234.00" then above code will return "."
    I hope this information help you to resolve your issue.
    eCommerce Developer.

  • Hard Drive Failed - How to get Blog/iWeb back to new hard drive?

    Our hard drive failed and none of the data is recoverable. I have a new hard drive and want to do a new post on our blog, but am worried it will delete our old blog (hence all our pix etc too) if I publish from this empty new blog. How do I get the old blog back on our computer from the iDisk I guess? Any help would be great cuz I have no clue what I'm doing!
    Same problem with our gallery and iPhoto. How to get those pix back in iPhoto apart from downloading them from the site?

    For future reference:
    _iWeb ’08: Backing up your Domain file_
    _Backing up your iPhoto library_
    How to back up MobileMe data
    Paragraph 2.3 of this FAQ page gives some tips on how to use published files, graphics, photos, etc., to help rebuild your iWeb site from scratch:
    http://iwebfaq.org/site/iWebBackupretrieve.html

  • How to get deleted photos back in the trash can?

    I tried to dele all the photos I've deleted from iPhoto by cmd+delete all the photos in the iPhoto trash can, but that only made all the photos reappear in iPhoto.
    How do I get the deleted photos back in the trash can?
    I discovered this the next time I turned on my mac, so I couldn't just "go back".
    I really don't wanna go trough ALL of my pictures and delete the thousands of pictures I've deleted over the past three years..
    I now know how to delete dem properly, but not how to get them all back in the trash can. Please help me!
    Ida

    There's no way to do that. If you try and trash thousands of photos at one go you'll trash the Library - which is what sounds like you've done.
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  

  • How to get data for custom feilds for standard datasource

    i have extracted CRM standard datasource 0CRM_OPPT_I.
    In RSA6 i slected feilds which i want to trnasfer to B Iand i also added some custom feilds.
    and then i went to RSA5 and i activated datasource.then i went to RSA3and  i extracted.
    In rSA3 selection screen all the custom feilds are selcted.
    after extraction if i go to LIST,only some of the custom feilds data is displaying remaining feilds displayed as blank data
    please tel me how to get data
    Thanks in advance
    HP

    Hi Hari,
    Sorry for late reply.
    Once you have done the proper mapping by using the transaction BWA1
    you need to write the BADI code which can be accesible from the following path:
    Go to transaction SPRO
    SAP Implementation guide ->Integration with other mySAP components ->Data transfer to the Business Information Warehouse->
    Settings for the application specific datasources (CRM) ->
    Settings for BW adapter->Execute Badi :BW adapter :Enhancement of datasources in messaging flow.
    Select you the datasource enhancement implementation it will open the BADI Implementation..
    go To interface tab and double click on the method..it takes you to the ABAP screen where you need to write the logic to populate the custom fields..
    Please feel free to mail back if you have any quries.
    All the Best..
    Thanks
    SK

  • How to get Data from B2 Cluster

    Hi
    I need to write a report which will get data from B2 Cluster.
    Please can anyone provide me with the code how to get to the cluster and read from ZL and PT
    Thanks in Advance

    Ok so far this is what I have done
    *& Report  ZAKTIME                                                     *
    REPORT  ZAKTIME                                 .
                   Dictionary tables/structures
    tables: pernr, pcl2, pcl1.
    include rpcxB200.
    infotypes: 0001.     "Org. Zuordnung
                          main logic
    TOP-OF-PAGE.
    START-OF-SELECTION.
            GET PERNR.
            RP-PROVIDE-FROM-LAST P0001 SPACE PNPBEGDA PNPENDDA.
    process the data according to the payroll area
       IF PERNR-WERKS EQ P0001-WERKS AND PERNR-BTRTL EQ P0001-BTRTL
          AND PERNR-KOSTL EQ P0001-KOSTL AND PERNR-BUKRS EQ P0001-BUKRS
          AND PERNR-ABKRS EQ P0001-ABKRS AND PERNR-KOKRS EQ P0001-KOKRS.
            PERFORM RETRIEVE_Time.
        ENDIF.
    END-OF-SELECTION.
    "======================================================================*
                           forms                                         *
    "======================================================================*
    FORM RETRIEVE_Time.
        B2-key-pernr = PERNR-PERNR.
        RP-IMP-C2-B2.                  "macro resides in table TRMAC
        IF rp-imp-b2-subrc = 0.
        ENDIF.
    ENDFORM.                            " RETRIEVE_PAYROLL
    Getting the following errors
    1. B2-Key_pernr is unknown
    2.Bezug is Unknown
    3. KNTAG is Unknown
    Notice number 2 and 3 is not even in my program....
    Also I was trying to pass the value to the parameter. why is this not working...

  • Contact from my phone book just disappeared.dont know how ..and it happen second time in 1 month time. Apple customer service in India is crap... Sorry to say but 700 contacts got disappeared.can someone tell me how to get this contacts back on my phone.p

    contact from my phone book just disappeared.dont know how ..and it happen second time in 1 month time. Apple customer service in India is crap... Sorry to say but 700 contacts got disappeared.can someone tell me how to get this contacts back on my phone.plz

    the same problem happened to me also, i felt that while playing hay day, if some calls came in between and if i answered the call, the setting of all the icloud items turns off. (i have backup of all the items on icloud), after deleting the account and making settings of mail, contact, calander etc on on mode and after rebooting the phone, it again download from icloud server. but it is just a headache. do not know how to handle this.

  • I'm really disappointed with new 5 update.  No music, No photos, No videos, lost all emails.  Anyone know how to get these all back?  Yes, I have synced and synced and synced.  Help

    I'm really disappointed with new 5 update.  No music, No photos, No videos, lost all emails.  Anyone know how to get these all back?  Yes, I have synced and synced and synced.  Help

    Hopefully it isn't too late for this but:  before performing an update it is really best if you close all apps (double click the home button, click and hold on one of the apps that appears at the bottom of the phone until the red minus sign appears and then tap the minus sign until all apps are closed) and then turn the phone off by holding the standby button until the slider saying "slide to power off" appears and slide it to turn the phone off.  Then turn the phone back on and hook it up to your computer to sync and perform the upgrade.  This also helps if you do this before performing syncs too.  I had problems with an iPod previously where it would fail to backup before sync most times, but have never had a problem with updates or syncs since I started performing this procedure.  Unfortunately, your pre-update backup may have failed and the data in your apps might be gone, but you could try to restore your phone.  If I remember correctly how to do this, you connect it to your computer and check for updates.  It should say you're up to date, but have an option to restore the phone.  If it does, I'd try that.  It may also have a "restore from backup" option you could try.

Maybe you are looking for

  • Mac running slow after downloading fonts

    ppppppppplllllllllllllllllzzzzzzzzzzzzzz help me!!!! I downloadied fonts yesterday and now my mac is running really slow!!!!! and Sims 3 wont quit so i cant turn it off!!! HELP

  • My satellite A200-1AG dosn't power on

    Hi: My A200 dosn't power on. When i plug-in the AC/DC adapter then blue led flahs one time, and this is all. No do any thing more. No led power on. help please.

  • Videos  iMac G5 10.4.11

    The video and sound are not in sync on my G5 10.4.11. What can I do?

  • 2/3 of 3D VOD movie trailers not working on LG 55LW5600

    I just received my new 3D set LG 55LW5600. I tried out the 3D movie trailers and found about 70% of those not working at all at least with my TV set. Pirates, Gforce and a few more were working excellent, however most failed with 2 totally different

  • Quicktime problem with Vista

    Downloaded Quicktime & it worked fine. Then shut down & rebooted computer hangs when Vista window comes up. Started in safe mode & Quicktime will run in safe mode. Would appreciate any help