You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andreas Hirner <an...@projektinter.net> on 2002/06/28 17:25:30 UTC

jsp:include and cgi

Hello,

i am trying to access a CGI using the include action but all I get is
a illigalStateException. Is there a way to call CGI  script within a
jsp page?

Regards Andreas



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: jsp:include and cgi

Posted by Scott Walters <sc...@integra-online.com>.
Posting to the cgi is by FAR the easiest 
option for you.  It may be a little slower 
but not nearly as much as you might think.  
If you decide you have to go the native 
route via JNI,  you'll have to either put 
your native code in a shared library/dll 
or embed Tomcat into your executable.  JNI 
will only deal with shared libraries.

Scott


6/28/02 10:17:19 AM, "Andreas Hirner" 
<an...@projektinter.net> wrote:

>Hello,
>
>> By "access a CGI" do you mean execute 
it?
>> If so,  you'll either need to do an 
http
>> post to it using HttpURLConnection and
>> related classes from java.net or 
attempt
>> to execute it directly if it's on the 
same
>> machine via a native library call.
>
>The CGI Script is on the same machine and 
produces images and text. So
>I guess the first option does not make 
sense, because it would be
>rather slow. But it is not an dynamic 
library. How can I load it and
>pass variables to it?
>
>Andreas
>
>> >i am trying to access a CGI using the
>> include action but all I get is
>> >a illigalStateException. Is there a 
way
>> to call CGI  script within a
>> >jsp page?
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-
user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: 
<mailto:tomcat-user-
help@jakarta.apache.org>
>
>
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: jsp:include and cgi

Posted by Andreas Hirner <an...@projektinter.net>.
Hello,

> By "access a CGI" do you mean execute it?
> If so,  you'll either need to do an http
> post to it using HttpURLConnection and
> related classes from java.net or attempt
> to execute it directly if it's on the same
> machine via a native library call.

The CGI Script is on the same machine and produces images and text. So
I guess the first option does not make sense, because it would be
rather slow. But it is not an dynamic library. How can I load it and
pass variables to it?

Andreas

> >i am trying to access a CGI using the
> include action but all I get is
> >a illigalStateException. Is there a way
> to call CGI  script within a
> >jsp page?






--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: jsp:include and cgi

Posted by Scott Walters <sc...@integra-online.com>.
By "access a CGI" do you mean execute it?  
If so,  you'll either need to do an http 
post to it using HttpURLConnection and 
related classes from java.net or attempt 
to execute it directly if it's on the same 
machine via a native library call.

Scott


6/28/02 9:25:30 AM, "Andreas Hirner" 
<an...@projektinter.net> wrote:

>Hello,
>
>i am trying to access a CGI using the 
include action but all I get is
>a illigalStateException. Is there a way 
to call CGI  script within a
>jsp page?
>
>Regards Andreas
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-
user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: 
<mailto:tomcat-user-
help@jakarta.apache.org>
>
>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>