struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bart Busschots <>
Subject Re: Controlling external process with struts
Date Fri, 21 Apr 2006 21:00:08 GMT
Hi Andreas,

Like any other web server a Java based web server use the Common Gateway 
Interface (or CGI) for sending information between the client and the 
server. This is a request-response protocol which is driven by the 
client and not the server. What you are trying to do is have the server 
push information to the client and ask the client for information when 
the server wants it. CGI was just not made for that hence I'd very 
strongly advise you not to waste your time on struts or anything like 
that for this problem, what ever you come up with will be a hack at best 
and will most probably work poorly and un-reliably.

If you absolutely must stay within the web environment I'd suggest using 
an applet as the front end and using TCP/IP sockets for the 
communication between the server and the client, that way the server can 
easily push and pull from the client which is exactly what CGI was not 
designed to allow you to do.

Best of luck with this,


Andreas Hartmann wrote:
> Hello!
> I've a commandline tool, which should be controlled through a http
> interface. Controlled means:
> - The process is started with the correct options (the user can "chose"
> them with the html-sites) -> this is no problem.
> - The output from the process should be continuously viewable by the user
> during running of the process.
> Can I realize this with struts? Which class / method could be used best? I
> want to see the output of the process at the browser though the process
> hasn't ended at all.
> - Sometimes, the process asks for some input, which must be given by the
> user through the webinterface. This should be realizable by parsing the
> output for building an appropriate input-form, which can ask the user for
> the data and bring them back to the waiting external process. This should
> work by setting the class with the running process to the session e.g.
> Has anybody some ideas, some hints how to do this? May be, there are known
> problems or it doesn't work at all?
> Kind regards,
> Andreas Hartmann
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message