Hi all,
This is probably very easy but in the brief looks i have had so far I
have not yet found the answer.
I am writing a program for internal use within the company i work for.
However, I want to create links from a web page to pass information
into the program.
I was thinking click on a hyperlink.myprogextension
which the user clicks open and a command is passed to the program or
another program which loads and connects to a port, and passes the
info in the file to the main program.
The program is always running so actually opening a file should just
toggle it to do certain actions with the data passed.
Is there an obviously solution to keep it simple? or would the open
with another program and pass via a network link be the best method,
as there is only 1 running instance of the main program?
Also how do you associate links in the java programming language in
windows, to enforce the loading of a file to an assigned java program?
Hope the above makes sense, any ideas to keep it as simple as possible
would be great or just pointers would also be really appreciated.
Many thanks in advance
David
Andrew Thompson - 11 Jan 2008 00:59 GMT
...
>This is probably very easy but in the brief looks i have had so far I
>have not yet found the answer.
This may not be the final answer, but the webstart based
SingleInstanceService* provides *most* of the functionality
that you mention. The only part I have not seen tested, is
that the SIS is more attuned to dealing with files that are
coming off the local file system - I am not sure how it would
react to files handed to it direct from the internet.
You might want to download the build file and set up a
test. I would be interested to hear your results.
* E.G. <http://www.physci.org/jws/#sis>

Signature
Andrew Thompson
http://www.physci.org/
Ivan Novick - 11 Jan 2008 04:41 GMT
> Hi all,
>
[quoted text clipped - 4 lines]
> However, I want to create links from a web page to pass information
> into the program.
Assuming you want to use all Java, then how about having a servlet on
your web server, activated by your link, and in the servelet use RMI
to communicate to the running process.
There are many many ways to do this ...
Regards,
Ivan Novick
http://www.0x4849.net
Roedy Green - 11 Jan 2008 11:51 GMT
On Thu, 10 Jan 2008 13:14:20 -0800 (PST), David
<david.goodyear@gmail.com> wrote, quoted or indirectly quoted someone
who said :
>I am writing a program for internal use within the company i work for.
>However, I want to create links from a web page to pass information
>into the program.
Usually you write a servlet. Web pages send GET-POST requests using
HTML forms.
You could write an Applet. It runs on the client. It can accept
keystrokes, and send data to a server.
You could write a JAWS app. It runs on the client. It can accept
keystrokes, and send data to a server. It runs independently of the
browser, thought he browser can launch it.
If you hate yourself, you would collect the data in JavaScript and
pass it through to an Applet.

Signature
Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com
David - 16 Jan 2008 14:56 GMT
On Jan 11, 11:51 am, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> On Thu, 10 Jan 2008 13:14:20 -0800 (PST), David
> <david.goody...@gmail.com> wrote, quoted or indirectly quoted someone
[quoted text clipped - 20 lines]
> Roedy Green, Canadian Mind Products
> The Java Glossary,http://mindprod.com
Hi all,
Thanks for the ideas, I will look into the RMI idea. Just to clarify
the program is actually already written using java as a standalone
app. It communicates with servers on other machines, so clicking on a
link has to pass information into a locally running process. Looking
at the replies I think RMI looks like the best candidate, before I'll
have to learn RMI and setup a server to run servlets to communicate
with a running process, any other ideas just in case there is a nice
simpler method?
Thanks for all the above help, really appreciated thanks.
Roedy Green - 16 Jan 2008 23:11 GMT
On Wed, 16 Jan 2008 06:56:00 -0800 (PST), David
<david.goodyear@gmail.com> wrote, quoted or indirectly quoted someone
who said :
>ny other ideas just in case there is a nice
>simpler method?
see http://mindprod.com/jgloss/remotefileaccess.html
for various ways of communicating between computers.

Signature
Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com
Roedy Green - 16 Jan 2008 16:04 GMT
On Thu, 10 Jan 2008 13:14:20 -0800 (PST), David
<david.goodyear@gmail.com> wrote, quoted or indirectly quoted someone
who said :
>I am writing a program for internal use within the company i work for.
>However, I want to create links from a web page to pass information
>into the program.
If you click something in a browser there are basically two ways you
can capture that:
1. an Applet. The applet can then send a message to some other app on
the same machine or on a server, or do the work itself.
2. hit submit in a form which sends a message to a server which then
hands the message to a Servlet for processing.
See http://mindprod.com/jgloss/applet.html
http://mindprod.com/jgloss/servlet.html

Signature
Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com