Apache: Server-side Java Applications

Apache: Server-side Java Applications

Post by davi » Sat, 25 Jan 1997 04:00:00



I want to run some java applications (not applets) on the server-side with
apache. Is there a more efficient way to do this than do just write CGI
programs in Java? I'm thinking of something along the lines of mod_perl --
but for Java.

-dave

--
   David Sklar  (dancing + listening + liberty + generic soda + trivia)

 
 
 

Apache: Server-side Java Applications

Post by Kyler Lai » Sun, 26 Jan 1997 04:00:00



>I want to run some java applications (not applets) on the server-side with
>apache. Is there a more efficient way to do this than do just write CGI
>programs in Java?

I hope so.  Java sucks for running as CGI code because it
doesn't (or at least didn't when I first played with it)
handle interpreter lines like
        #!/usr/local/bin/java
So you end up having to put a damn wrapper around every
program.

I made a modification to mod_cgi to allow OS/2 to run
arbitrary (awk/perl/sh/...) scripts instead of just REXX
scripts and binaries.  There's already code in mod_cgi
to catch CGI programs with ".CMD" (REXX) extensions.

If you put such a trap in for some arbitrary Java
extension (".class"?), then you could much more easily
run Java code as CGI programs.

Of course...you'd still need an easy way to get the
environment variables.  The first bit of Java code that
I wrote (and about the last) was an interface to some
simple 'C' code to get environment variables.  I know;
it's bad style, but it worked well.  (The Better
Solution would be to send the data from the Apache
module in execl().)

Quote:>I'm thinking of something along the lines of mod_perl --
>but for Java.

Yeah, this would be better.  FastCGI might also have
some benefits.  Depending on the usage, prestarting
could be quite beneficial.  

Of course, if you're using something that much, you
should probably just compile it.

--kyler

 
 
 

Apache: Server-side Java Applications

Post by Bjorn Boru » Mon, 27 Jan 1997 04:00:00



|
| I hope so.  Java sucks for running as CGI code because it doesn't
| (or at least didn't when I first played with it) handle interpreter
| lines like #!/usr/local/bin/java So you end up having to put a damn
| wrapper around every program.

on decent operating systems you can run Java from the command line.
it's a compile time option on newer Linux kernels, so you might want
to recompile.

now I just wonder why anyone would want to use Java for CGI.  perhaps
it is due to some misguided idea that it's more portable? maybe it is
due to the fact that it's OO and you know as well as I do that OO
_always_ provokes a drooling-response in some people (the ones with
ties).

Perl is still the server-side-language of the web.  because has
everything Java doesn't have.  including portability.

I am more likely to use Emacs in batch-mode and program CGI in Emacs
Lisp than to use Java.

personally I prefer to use PHP/FI for server-side stuff.  if
performance is very critical; I write a module or I extend PHP/FI.

-Bj?rn
--

 <URL:http://www.pvv.unit.no/~borud/> |      for "Netscape"
 UNIX person, one of "them"           |   (from Lars Haugseth)

 
 
 

Apache: Server-side Java Applications

Post by Alan C » Tue, 28 Jan 1997 04:00:00




Quote:>now I just wonder why anyone would want to use Java for CGI.  perhaps
>it is due to some misguided idea that it's more portable? maybe it is
>due to the fact that it's OO and you know as well as I do that OO
>_always_ provokes a drooling-response in some people (the ones with
>ties).

I'm no fan of Java, I tend to repeat the words "UCSD p-system" at people
until they look it up. However it and several other languages have important
advantages for CGI you shouldn't overlook. The big one in theory being
security. Perl has most of those advantages (self sizing strings etc).
Python has similar things on offer but is also object oriented and portable.

Alan
--

-------- http://www.cymru.net ----------       Phone: +44 1792 290194
Internet/Intranet Solutions, ISDN, Leased Lines, Consultancy and Support

 
 
 

Apache: Server-side Java Applications

Post by John Frank » Tue, 28 Jan 1997 04:00:00



> I'm no fan of Java, I tend to repeat the words "UCSD p-system" at people
> until they look it up.

--

The similarity also occured to me.  But I see this as a very positive
reflection on the UCSD p-system rather than a negative one on java.
The p-system was very well designed.  It was just fif* years ahead
of its time.  Now that we have much faster CPU's and much more memory
this kind of portability makes a lot of sense.

John Franks     Dept of Math. Northwestern University

 
 
 

1. Apache w/ Server-Side Java?

hello all-

i am wondering if anyone has created a module for using server-side java
in apache? i have seen the module from david young but i am hoping that
someone has an implimentation using the new Java Native Interface and
the new JDK 1.1? if not, what is the current status of the whole
server-side java/apache module effort? is this something that the apache
group is interested in doing?

if work is not being done by the apache group we will write one
ourselves but we were hoping that some of the work had been started
already.

thanks in advance.

-devon
--
---------------------------------------
 d  e  v  o  n     l  a  z  a  r  u  s
    t e c h n o l o g y   g r o u p
        D i g i t a l T h i n k
      http://www.digitalthink.com

2. Message queues questions

3. Server-side Java (SSJ) on Apache

4. CDROM XM5301 Toshiba 4xSpeed SCSI-2 with SunOS 5.4

5. server side java and apache?

6. Linux expert needed for server setup

7. Server Side Java on Apache??

8. CERT Network Monitoring Advisory (was Showtime, INC. warns you to "change your password")

9. server-side java

10. NS 3.0, server-side java, and shared libraries

11. server-side map 2 client-side map utility?

12. Server-side includes in Apache-1.3.14

13. Getting Apache to do server-side includes locally