Execute Java program from file extension

Discussion in 'HTML' started by nospam, Jan 15, 2008.

  1. nospam

    nospam Guest

    Hello,

    Hmmm, I have a plumbing problem - and it is difficult to explain.
    I need to connect a Java program on the client to some server XML codes.

    Basically, I've been given a Java program to execute on client side.
    When the user hits the "Download" button, the server creates an XML file
    and send it to the client as a file with the file extension ".rcm".
    This file extension has already been registered via an install program on
    the client.
    It will then spawn/execute the client Java program.

    I'm not sure what is the server-side response that I have to send to the
    client before the actual data ( that is the ".rcm" file).

    Is there some magic HTTP header that I send that can get this to work?

    Here is a stab at what I thought would do it:

    Content-type: application/octet-stream
    'Content-Length: '. filesize(4096)

    Content-Disposition: attachment; filename='MYFILE.RCM"


    Thanks in advance for you help.

    Regards,
    bruce
     
    nospam, Jan 15, 2008
    #1
    1. Advertising

  2. nospam wrote:

    > Basically, I've been given a Java program to execute on client side.
    > When the user hits the "Download" button, the server creates an XML
    > file and send it to the client as a file with the file extension ".rcm".
    > This file extension has already been registered via an install program
    > on the client.


    You want to set up the MIME-Type "application/x-rcm+xml" on the client
    and server.

    That is, in the client's browser settings, configure
    "application/x-rcm+xml" to be opened with your Java program. On the
    server, configure the web server software (e.g. Apache) to send a
    "Content-Type: application/x-rcm+xml" header when it serves the file.

    --
    Toby A Inkster BSc (Hons) ARCS
    [Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
    [OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 18 days, 4 min.]

    Gnocchi all'Amatriciana al Forno
    http://tobyinkster.co.uk/blog/2008/01/15/gnocchi-allamatriciana/
     
    Toby A Inkster, Jan 17, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve
    Replies:
    3
    Views:
    27,078
    Steve
    Aug 25, 2006
  2. llothar
    Replies:
    17
    Views:
    1,273
    Steve Holden
    Apr 7, 2008
  3. Bianca
    Replies:
    0
    Views:
    503
    Bianca
    Jun 19, 2011
  4. Savas Ates
    Replies:
    1
    Views:
    299
    Patrice
    Aug 17, 2004
  5. Jacob Repp
    Replies:
    0
    Views:
    78
    Jacob Repp
    Feb 24, 2006
Loading...

Share This Page