Re: java like a CGI
Daniel Pitts wrote:
Yoni wrote:
I have a java [sic] program that I want to run in my cgi-bin directory.
For God's sake, why?
My hosting plan does not support java [sic].
Switch hosting plans or use a different language than Java.
If I can compile my java [sic] class into binary code (embedding a jvm [sic])
I should be able to use that program like a cgi.
Any suggestion? :)
Don't.
I would like to avoid to translate that stuff in python or changing my hosting plan :-)
You want a lot of contradictory things.
Why don't you want to translate the code or change hosting plans?
Which is more work - banging together a Java program to use like it isn't Java,
or switching to a host that lets you use Java?
Over the long haul?
Really?
Running Java as a CGI isn't a great idea in the first place. Most "web"
Understatement.
based Java programs are called "webapps", and they use "servlets". A
servlet is basically a java [sic] program which acts as a web server directly,
Not exactly. It is a Java class that is invoked by the web server, itself a Java
program.
so the Java program doesn't need to "start up" every time a user request
comes in.
Step back and decide what you really want to accomplish. You don't want to
create a whole bunch of moreau hybrids whose components collide with
each other.
One assumes, given your question, that you don't expect to serve more than a
few dozen requests per minute.
--
Lew