[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: help: How to execute a program on the server from a html page
Hi Anh Tien Dung,
At the moment, the most popular way is the CGI ( Common Gateway Interface).
You should talk to your system admin about allowing you to open a CGI
account. For security reason they don't like that very much. But if you
site does not require a strict security, they may allow you to do that.
After having such an account, you can put any executable in that account.
Any link or form pointing to that program will hit the program and
execute it. The standard output will be fed to the Web server.So the first
output should be the header of a Web page:
i.e: If it is in C it should be
printf("<HTML> <BODY>....");
and the last comment should be
printf("</HTML>");
This Web page will be a dynamically generated one.
The most usual CGI progs are written in C or Perl but it can be any
executable ( Java and anything ). But in this case Java
does not have any advantage.
Java and JavaScript don't run on the Server. It run on the client side.
The Browser download the applet and Script and call the classloader embedded
in the Browser. If the Browser is not Java-ennabled you will not be able
to execute anything.
There are still more details to be more correct, but I think this is
what you want. If not just ask. I am not talking about more advanced
Communication stuffs.
Cheers
Aiviet
On Fri, 13 Jun 1997, Nguyen Tien Zung wrote:
> Hi ca'c ba'c CS
>
> Ba'c na\o bie^'t la\m the^' na\o dde^? cha.y 1 chu+o+ng tri\nh o+? server
> side
> from a html page thi\ ba\y cho tui vo+'i, co' vi' du. cu. the^, ca\ng
> to^'t. Xin dda ta.
> tru+o+'c. Java hay javascript co' cho phe'p la\m vie^.c na\y kho^ng? Hay
> co' the^?
> la\m 1 ca'i CGI the^' na\o ddo' ddu+o+.c kho^ng? ... Xin ca'c ba'c chi?
> ba?o cho
> (dda(.c bie^.t ne^'u pha?i du\ng CGI thi\ xin cho vi' du., vi\ ca'i na\o
> tui chu+a he^\
> bie^'t no' ra la\m sao).
>
> Many thanks in advance.
>
> Zung
>
>