Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.help > #2671

Re: java like a CGI

Newsgroups comp.lang.java.help
Date 2013-04-11 16:59 -0700
References <10962715-f6a2-4668-b755-cb5a74b07e76@googlegroups.com> <4UG9t.23863$Zt5.12866@newsfe15.iad>
Message-ID <0d3dfcfa-514f-4a34-aac6-fe5db72933fd@googlegroups.com> (permalink)
Subject Re: java like a CGI
From Lew <lewbloch@gmail.com>

Show all headers | View raw


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

Back to comp.lang.java.help | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

java like a CGI Yoni <a.sfolcini@gmail.com> - 2013-04-11 13:48 -0700
  Re: java like a CGI markspace <markspace@nospam.nospam> - 2013-04-11 14:44 -0700
    Re: java like a CGI Roedy Green <see_website@mindprod.com.invalid> - 2013-04-11 18:17 -0700
  Re: java like a CGI Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-04-11 15:34 -0700
    Re: java like a CGI Lew <lewbloch@gmail.com> - 2013-04-11 16:59 -0700
      Re: java like a CGI Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2013-04-12 09:55 -0700
  Re: java like a CGI Roedy Green <see_website@mindprod.com.invalid> - 2013-04-11 17:37 -0700
  Re: java like a CGI 1connu <1connu999@gmail.com> - 2013-04-12 18:24 +0200

csiph-web