Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #2668 > unrolled thread
| Started by | Yoni <a.sfolcini@gmail.com> |
|---|---|
| First post | 2013-04-11 13:48 -0700 |
| Last post | 2013-04-12 18:24 +0200 |
| Articles | 8 — 6 participants |
Back to article view | Back to comp.lang.java.help
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
| From | Yoni <a.sfolcini@gmail.com> |
|---|---|
| Date | 2013-04-11 13:48 -0700 |
| Subject | java like a CGI |
| Message-ID | <10962715-f6a2-4668-b755-cb5a74b07e76@googlegroups.com> |
Hello, I have a java program that I want to run in my cgi-bin directory. My hosting plan does not support java. If I can compile my java class into binary code (embedding a jvm) I should be able to use that program like a cgi. Any suggestion? :) I would like to avoid to translate that stuff in python or changing my hosting plan :-) thank you!
[toc] | [next] | [standalone]
| From | markspace <markspace@nospam.nospam> |
|---|---|
| Date | 2013-04-11 14:44 -0700 |
| Message-ID | <kk7an3$j4l$1@dont-email.me> |
| In reply to | #2668 |
On 4/11/2013 1:48 PM, Yoni wrote: > Hello, > > I have a java program that I want to run in my cgi-bin directory. My > hosting plan does not support java. If I can compile my java class > into binary code (embedding a jvm) I should be able to use that > program like a cgi. > > Any suggestion? :) Yes, get a hosting provider that supports Java. I don't think the compiled-Java stuff works, strictly speaking. Amazon EC2 instances work fine for Java, a full container like JBoss can run easily on a micro instance. And micro instances are free for the first year if you're a new customer. I don't want to sound like an advert for Amazon EC2, but it's a decent deal if you're just starting out.
[toc] | [prev] | [next] | [standalone]
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Date | 2013-04-11 18:17 -0700 |
| Message-ID | <runem8hu88m446mj0f3s25kjpp7qrvsp5v@4ax.com> |
| In reply to | #2669 |
On Thu, 11 Apr 2013 14:44:36 -0700, markspace <markspace@nospam.nospam> wrote, quoted or indirectly quoted someone who said : >I don't want to sound like an advert for Amazon EC2, but it's a decent >deal if you're just starting out. see http://mindprod.com/jgloss/ec2.html for overview and links. -- Roedy Green Canadian Mind Products http://mindprod.com Computer programming is the best remedy for pain (physical or emotional) I have encountered. It requires so much concentration there is nothing left over to pay attention to the pain. They should teach this in AA.
[toc] | [prev] | [next] | [standalone]
| From | Daniel Pitts <newsgroup.nospam@virtualinfinity.net> |
|---|---|
| Date | 2013-04-11 15:34 -0700 |
| Message-ID | <4UG9t.23863$Zt5.12866@newsfe15.iad> |
| In reply to | #2668 |
On 4/11/13 1:48 PM, Yoni wrote: > Hello, > > I have a java program that I want to run in my cgi-bin directory. > My hosting plan does not support java. > If I can compile my java class into binary code (embedding a jvm) I should be able to use that program like a cgi. > > Any suggestion? :) > > I would like to avoid to translate that stuff in python or changing my hosting plan :-) > > thank you! > Running Java as a CGI isn't a great idea in the first place. Most "web" based Java programs are called "webapps", and they use "servlets". A servlet is basically a java program which acts as a web server directly, so the Java program doesn't need to "start up" every time a user request comes in.
[toc] | [prev] | [next] | [standalone]
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Date | 2013-04-11 16:59 -0700 |
| Message-ID | <0d3dfcfa-514f-4a34-aac6-fe5db72933fd@googlegroups.com> |
| In reply to | #2670 |
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
[toc] | [prev] | [next] | [standalone]
| From | Daniel Pitts <newsgroup.nospam@virtualinfinity.net> |
|---|---|
| Date | 2013-04-12 09:55 -0700 |
| Message-ID | <d0X9t.431447$SE5.413300@newsfe28.iad> |
| In reply to | #2671 |
On 4/11/13 4:59 PM, Lew wrote: > 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. Yes, though I didn't think that level of detail was useful for the OP. > >> 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. Good advice. > 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.
[toc] | [prev] | [next] | [standalone]
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Date | 2013-04-11 17:37 -0700 |
| Message-ID | <smlem8tibmmkusu6uie64v9l6ek60geg1m@4ax.com> |
| In reply to | #2668 |
On Thu, 11 Apr 2013 13:48:30 -0700 (PDT), Yoni <a.sfolcini@gmail.com> wrote, quoted or indirectly quoted someone who said : >I have a java program that I want to run in my cgi-bin directory. >My hosting plan does not support java. >If I can compile my java class into binary code (embedding a jvm) I should be able to use that program like a cgi. > >Any suggestion? :) Find a new ISP or set up a little Linux server and host it yourself on your home LAN. They will be even less happy about you running arbitrary apps. see http://mindprod.com/jgloss/ispvendors.html -- Roedy Green Canadian Mind Products http://mindprod.com Computer programming is the best remedy for pain (physical or emotional) I have encountered. It requires so much concentration there is nothing left over to pay attention to the pain. They should teach this in AA.
[toc] | [prev] | [next] | [standalone]
| From | 1connu <1connu999@gmail.com> |
|---|---|
| Date | 2013-04-12 18:24 +0200 |
| Message-ID | <kk9cfb$1kn$1@shakotay.alphanet.ch> |
| In reply to | #2668 |
Yoni a écrit : > Hello, > > I have a java program that I want to run in my cgi-bin directory. > My hosting plan does not support java. > If I can compile my java class into binary code (embedding a jvm) I should be able to use that program like a cgi. > > Any suggestion? :) > > I would like to avoid to translate that stuff in python or changing my hosting plan :-) > > thank you! You can try to use gwt (https://developers.google.com/web-toolkit/) to compile your original program into an equivalent javascript/html page
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.java.help
csiph-web