web server exe and js

R

richmond

Please forgive me if this question is not readable for you. I
definitely want to get in-depth on this. I am in front of a web
application. On the server side, it has the main exe under
http://virtualdir/bin, and other javascript files under c:/virtualdir.
They all work for the same web link. One scenario is, on client side,
user accesses the link, click on one button, such button is processed
thru the javascripts, and then some native commands are executed. I
think such command execution got processed by the main exe mentioned
above. I want to know how the javascript communicats with that main
exe.. Any examples, high-level architecture illustration, any valuable
reference web link will be highly appreciated. ...........i googled on
some of that topic......i guess the exe itself could be written in
java also...and it can have some way to invoke some prepared jar files
to execute the native command (which can be manually executed on dos
command line).

regards.
Thanks in advance.

Richmond
 
G

Grant Wagner

richmond said:
Please forgive me if this question is not readable for you. I
definitely want to get in-depth on this. I am in front of a web
application. On the server side, it has the main exe under
http://virtualdir/bin, and other javascript files under c:/virtualdir.
They all work for the same web link.

The structure and location of the server-side resources is irrelevant as
long as they are reachable on the Web server using http://
One scenario is, on client side,
user accesses the link, click on one button, such button is processed
thru the javascripts, and then some native commands are executed. I
think such command execution got processed by the main exe mentioned
above. I want to know how the javascript communicats with that main
exe..

There are a couple of ways for client-side JavaScript to communicate with
a server-side resource:

1) the client-side JavaScript can request the resource via a GET, passing
the values to the server in the form of a query string, using
top.frames['someHiddenFrame'].location.href = 'page.cgi?variable=value';
or (new Image()).src = 'page.cgi?variable=value'; This type of activity is
fairly well supported in version 4+ browsers (Netscape 4+, IE 4+, etc).
The downside to this approach is it can be difficult to retrieve
information returned by the server in response to the initial client-side
GET <url: http://jibbering.com/faq/#FAQ4_34 />

2) the client-side JavaScript can use the HTTPRequest object to perform
direct GET or POST requests. This is only supported in relatively modern
browsers, but it can make retrieving data returned by the server much
easier. Documentation on using the HTTPRequest object at <url:
http://jibbering.com/2002/4/httprequest.html />
Any examples, high-level architecture illustration, any valuable
reference web link will be highly appreciated. ...........i googled on
some of that topic......i guess the exe itself could be written in
java also...and it can have some way to invoke some prepared jar files
to execute the native command (which can be manually executed on dos
command line).

It does not matter what technology is used to create the server-side
resource. If you are using client-side JavaScript, you are interacting
with it as an HTTP resource. As far as the browser is concerned, it is
"just another Web page".

I hope that provides the information you were looking for.
 
R

richmond

Thanks a lot for your reply.

The application in front of me does use a web.exe to bring up the
central page.
How does this web.exe communicate with the javascripts?
Could you please give some examples of different implementations on
that?
Could that web.exe be compiled from java sources?

I do know that web.exe receiving some parameters from the javascripts
and then running some command line utilities.

Thanks



Grant Wagner said:
richmond said:
Please forgive me if this question is not readable for you. I
definitely want to get in-depth on this. I am in front of a web
application. On the server side, it has the main exe under
http://virtualdir/bin, and other javascript files under c:/virtualdir.
They all work for the same web link.

The structure and location of the server-side resources is irrelevant as
long as they are reachable on the Web server using http://
One scenario is, on client side,
user accesses the link, click on one button, such button is processed
thru the javascripts, and then some native commands are executed. I
think such command execution got processed by the main exe mentioned
above. I want to know how the javascript communicats with that main
exe..

There are a couple of ways for client-side JavaScript to communicate with
a server-side resource:

1) the client-side JavaScript can request the resource via a GET, passing
the values to the server in the form of a query string, using
top.frames['someHiddenFrame'].location.href = 'page.cgi?variable=value';
or (new Image()).src = 'page.cgi?variable=value'; This type of activity is
fairly well supported in version 4+ browsers (Netscape 4+, IE 4+, etc).
The downside to this approach is it can be difficult to retrieve
information returned by the server in response to the initial client-side
GET <url: http://jibbering.com/faq/#FAQ4_34 />

2) the client-side JavaScript can use the HTTPRequest object to perform
direct GET or POST requests. This is only supported in relatively modern
browsers, but it can make retrieving data returned by the server much
easier. Documentation on using the HTTPRequest object at <url:
http://jibbering.com/2002/4/httprequest.html />
Any examples, high-level architecture illustration, any valuable
reference web link will be highly appreciated. ...........i googled on
some of that topic......i guess the exe itself could be written in
java also...and it can have some way to invoke some prepared jar files
to execute the native command (which can be manually executed on dos
command line).

It does not matter what technology is used to create the server-side
resource. If you are using client-side JavaScript, you are interacting
with it as an HTTP resource. As far as the browser is concerned, it is
"just another Web page".

I hope that provides the information you were looking for.
 
G

Grant Wagner

richmond said:
Thanks a lot for your reply.

The application in front of me does use a web.exe to bring up the
central page.
How does this web.exe communicate with the javascripts?

I have no idea.
Could you please give some examples of different implementations on
that?

I already provided examples. GET the content into a hidden frame and parse it using client-side code, or
GET/POST the resource using the XML HTTP Request object.
Could that web.exe be compiled from java sources?

As I said, it does not matter. It is an http resource. If you can GET/POST it, you can interact with it from
at least some client-side JavaScript implementations.
I do know that web.exe receiving some parameters from the javascripts
and then running some command line utilities.

I could replicate that behaviour with client-side JavaScript as simple line as:

- window.open('http://server/web.exe?parameter=value'); or
- window.location.href = 'http://server/web.exe?parameter=value'; or
- (new Image()).src = 'http://server/web.exe?parameter=value';

or static HTML as simple as:

<a href="http://server/web.exe?parameter=value">Start</a>

It depends entirely on what you are trying to accomplish.
 
R

Robert

Thanks a lot for your reply.

The application in front of me does use a web.exe to bring up the
central page.

The Internet works on a client and server model. The client can be
any web browser working from an HTML file with Javascript as the
programming language. The Server can be any OS running any server
program.

While it is posible for Windows applications to interact with IE from
an exe file, we don't normal discuss that posiblity in this form.
These programs are really using IE as a window manager. They can do
anything. Hence, it is difficult to know what and how they are doing
things.

In this forum, we are concerned with client programming that can be
run from any browser on any OS. By talking about an exe, you are
saying it isn't cross platform and this isn't the right forum to
discuss it.

Folks are more than will to discuss how you can implement an Internet
application.

I hope this helps and I am only generalizing what people discuss in
this forum since they can discuss whatever they wish.


Robert
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,815
Latest member
treekmostly22

Latest Threads

Top