Tuesday 15 April 2014

How to execute a Java class as CGI script -


I'm not sure whether this is possible or not. Can I execute Java class as a CGI script, if JRE is installed and configured on the server computer? If yes then how? Please share some references.

Yes, but it will be very slow to be interesting for actual production use.

CGI was originally designed to launch an external program for allocation, which is very slow for busy scripts. For JVM this would probably be true, but you can do it.

You can use environment variables with System.getEnv () calls, and you can output the results together with system.out.println () . Remember the first print header, then a blank line and then the actual reaction.

No comments:

Post a Comment