httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "yanming lu" <lu_yanm...@hotmail.com>
Subject Re: cgi-java on Windows NT
Date Fri, 21 Jun 2002 12:54:54 GMT
Thanks for your help. But I tried many different ways, none of them worked. 
It seems to me that the server never executes the java.exe command. Could 
you try your server to run a simple java CGI?

Thanks,


>From: Lee Fellows <lfellows@4lane.com>
>Reply-To: users@httpd.apache.org
>To: users@httpd.apache.org
>Subject: Re: cgi-java on Windows NT
>Date: 21 Jun 2002 08:44:11 -0400
>
>The .bat file needs to emit a content header.
>
>What I do is put two echo statements at the top of the script:
>  echo Content-type: text/plain
>  echo
>
>and then the rest of your .bat.
>You may not want a content-type of text/plain for your application,
>depending upon what the java application is going to emit.  But if
>you are just capturing standard out and showing that to the user,
>text/plain  should work fine.
>
>HTH
>
>On Thu, 2002-06-20 at 18:26, yanming lu wrote:
> > hi Lee, my server still couldn't execute a *.bat file. here is part of 
>my
> > httpd.conf file:
> >
> > ScriptAlias /cgi-bin/ "D:/Apache/Apache2/cgi-bin/"
> >
> > AddHandler cgi-script .cgi .bat .exe
> >
> > #
> > # "D:/Apache/Apache2/cgi-bin" should be changed to whatever your
> > ScriptAliased
> > # CGI directory exists, if you have that configured.
> > #
> > <Directory "D:/Apache/Apache2/cgi-bin">
> >     AllowOverride None
> >     Options +ExecCGI
> >     Order allow,deny
> >     Allow from all
> >     SetHandler cgi-script
> > </Directory>
> >
> > and test.bat file:
> > @echo off
> > set JAVA_HOME=d:\jdk1.3.1
> > set path=d:\jdk1.3.1\bin
> > set CLASSPATH=.\
> > %JAVA_HOME%\bin\java Test
> >
> > the error screen i got from the server:
> >
> > Server error!
> > Error message:
> > Premature end of script headers: test.bat
> > If you think this is a server error, please contact the webmaster
> > Error 500
> > localhost
> > 06/20/02 18:03:18
> >
> > The server can execute a C-style *.exe program but not a batch file, 
>why?
> > how to fix it? Do I need to edit registry?
> >
> > Thanks,
> >
> > lj
> >
> >
> >
> >
> > >From: Lee Fellows <lfellows@4lane.com>
> > >Reply-To: users@httpd.apache.org
> > >To: users@httpd.apache.org
> > >Subject: Re: cgi-java on Windows NT
> > >Date: 20 Jun 2002 10:52:13 -0400
> > >
> > > >From my httpd.conf:
> > >
> > >   ...
> > >   LoadModule cgi-module modules/mod_cgi.so
> > >   (If you are using ver. 1.3.x, you may need a 'AddModule mod_cgi.c'
> > >    also)
> > >   ...
> > >
> > >   AddHandler cgi-script .cgi .bat (et al)
> > >
> > >   ...
> > >
> > >   # The Directory I am executing CGIs in is a UserDir config
> > >   <Directory /home/*/public_html>
> > >	AllowOverride FileInfo AuthConfig Limit
> > >	Options MultiViews Indexes SymLinksIfOwnerMatch Includes ExecCGI
> > >   </Directory>
> > >
> > >
> > >HTH
> > >
> > >On Thu, 2002-06-20 at 10:26, yanming lu wrote:
> > > > Thanks Lee. Could you send me an example of this part of a http.conf
> > >file?
> > > > So i may not make any mistakes when i configure by myself.
> > > >
> > > > Thanks alot!
> > > >
> > > >
> > > > >From: Lee Fellows <lfellows@4lane.com>
> > > > >Reply-To: users@httpd.apache.org
> > > > >To: users@httpd.apache.org
> > > > >Subject: Re: cgi-java on Windows NT
> > > > >Date: 20 Jun 2002 10:25:13 -0400
> > > > >
> > > > >Do you have mod_cgi loaded?
> > > > >If so, add ExecCGI to Options for controlling Directory entry in
> > > > >httpd.conf and add .bat to the list of file extensions for
> > > > >'AddHandler cgi-script'.  Provided your PATH is set for java in the
> > > > >script, it should work.
> > > > >
> > > > >On Thu, 2002-06-20 at 09:36, yanming lu wrote:
> > > > > > How do we configure Apache http server to run cgi java programs
> > >(with no
> > > > > > java servlet/jsp, tomcat)? How do we let server to execute a

>*.bat
> > >file?
> > > > > >
> > > > > > lj
> > > > >
> > > > >
> > > > >
> > > > 
> >---------------------------------------------------------------------
> > > > >To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > > >For additional commands, e-mail: users-help@httpd.apache.org
> > > > >
> > > >
> > > >
> > > > _________________________________________________________________
> > > > Get your FREE download of MSN Explorer at
> > >http://explorer.msn.com/intl.asp.
> > > >
> > > >
> > > > 
>---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > > > For additional commands, e-mail: users-help@httpd.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > >---------------------------------------------------------------------
> > >To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > >For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
> > _________________________________________________________________
> > Get your FREE download of MSN Explorer at 
>http://explorer.msn.com/intl.asp.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> > For additional commands, e-mail: users-help@httpd.apache.org
> >
> >
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message