Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open a commandline gui from CGI using system

Status
Not open for further replies.

vrajasek

Programmer
Jan 14, 2004
7
US
Hi Guys,

I have been trying on system command in CGI and thought that it doesnot work in it. But found that system works perfectly well in CGI.

I have written a command line program which starts a Java gui when executed at the command line in Linux. It works perfectly well. But now I have a cgi user interface which calls this command line program. But the Java gui doesnot start now.

I tried to start other command line gui functions like gimp and xpdf but they too didnot start. Hence that was the reason why I couldnot run the program.

Is there a solution to this problem. it would be of great help to me if there is a solution since this is the end position of my project and if there is no solution for it, I will have to start it over again.

Please help!!!
 
CGI is not an interactive medium.

What you need to do is make your java command accessible via a java applet.

Then have your html or cgi contain the appropriate applet loading commands in html.
 
Yep, you should probably pose your problem in the Java(sun) forum, I sure someone will point out some good tutorials on applets (don't worry they aren't too bad).

Hope you solve your problem.

Sean.
 
But the problem is that for that java applet program, we have a command line execution and that is in Shell script. And hence I have to depend on the execution of the shell script for running that java application. So I need to use the system command for running it from CGI. If we depend on that java application, we need to spend long time to execute it 1000 times for different inputs. So.........

Any ideas!!!!
 
Get an applet that opens your command line window.

From there you can run the shell script to run the local java program.

Your overall design and architecture is not well-thought out and not 'web compatible'. This means you must jump through some hoops to satisfy your requirement.

 
yeah thats what happens in R&D. Initial design always sucks.

Thanks,
Vijay
 
It doesn't have to :)

So Command line applet to manual launch of java code via commandline should be the way to go.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top