Comment on Tutorial - Execute system commands in a Java Program By Rajan



Comment Added by : Prats

Comment Added at : 2013-02-02 17:33:40

Comment on Tutorial : Execute system commands in a Java Program By Rajan
FILE:- lpton.pl......
...........................................................
#!/opt/lampp/bin/perl
# Parallel port CGI script
#
# Send HTTP headers
print "Content-type: text/html\n\n";
#print "Content-type: text/html\n\n";
#print "Content-type: text/html\n\n";
# Output web page data

print "Parallel port controlled";
print "<a href=\"/Test/index2.html\">Go back to controlling page</a>";

system('/usr/sbin/test 0xff');
.................................................................
This is a script for executing a c program(test) under /usr/sbin/ directory. This script works absolutely fine when this file lpton.pl is executed through command line. But when i try to execute the same file(lpton.pl) through a web server (lampp) only the print statement is getting displayed on browser but the c program is not getting executed....plzz do help me with it......


View Tutorial



Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. this work is good
View Tutorial          By: sanath at 2008-12-15 01:18:43

2. hi am new to java! i need some simple java program
View Tutorial          By: Anu at 2010-09-08 08:17:49

3. very thanks...
View Tutorial          By: anush at 2012-08-10 07:46:53

4. nice one !!! just keep it .. i have learn a lot..
View Tutorial          By: dondon at 2011-07-27 04:43:40

5. Thank You
View Tutorial          By: Alex at 2011-02-09 04:26:07

6. Thank you very much. This is the easiest and also
View Tutorial          By: Mehmet Ãœsküp at 2013-06-17 21:08:08

7. THANX FOR THE INFO....
View Tutorial          By: Abhinaykumar at 2010-07-06 11:34:53

8. Excelent article, I will start to use struts 2 now
View Tutorial          By: Alex at 2010-01-20 16:13:34

9. Really help ful. To read abt jsp and servlet chk o
View Tutorial          By: Raju at 2009-07-13 11:25:41

10. i want to do a program by using convertView with e
View Tutorial          By: Shahana Akter at 2014-09-11 07:34:43