Request.getRequestDispatcher("servletName").include(request,response)
will invoke a servlet
But if you can directly invoke any program (in java, runtime.execute(), in c
system(), etc), why you want to do it through a servlet?
----- Original Message -----
From: "Daniel Lynn" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 31, 2002 10:51 PM
Subject: Re: invoking program
> Kind of. Only thing is I want to be able to call it using any other
programming
> language. Basically, what I'm doing is creating a bunch of programs that,
when
> invoked, read a bunch of data from a database and format it and return the
> string. However, I don't want to require that the person invoking the
program be
> using a Java based language. I'd like to be able to do it from JSP, PHP,
ASP,
> Perl, etc. I'd also love to be able to invoke it with Javascript or html,
but
> that may be asking a little too much.
>
> I did some PHP programming a little ways back and I used a "curl" command
to
> send a bunch of data to a cgi file and wait for a delimited string (if you
do
> any ecommerce programming, you've probably had to do this when verifying
the
> credit card). What that CGI file is doing is kinda what I'm looking for.
Is
> there a way to make a servlet get triggered without using an http link
(aka,
> without opening it as a page in your browser) using any given programming
> language?
>
> -Dan
>
> Gang Zhang wrote:
>
> > You can use:
> >
> > java.lang.Process proc= java.lang.Runtime.exec("Yourcommand");
> > //while loop to get process output:
> > proc.getOutputStream().read(buf);
> >
> > Is that what you are talking about?
> >
> > ----- Original Message -----
> > From: "Daniel Lynn" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, July 31, 2002 4:04 PM
> > Subject: invoking program
> >
> > > I've got a task that I'm trying to accomplish and I think there's some
> > chancew
> > > that servlets might be a solution. Would anyone be able to point me in
the
> > > right direction?
> > >
> > > I need to have a program that I can send a request to (without
importing
> > the
> > > code into another program) and have it return a string, much like you
can
> > do
> > > with coding a CGI in C. It would need to run on our server even if
called
> > from
> > > another. Any suggestions?
> > >
> > > -Dan
> > >
> > >
> >
___________________________________________________________________________
> > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> > body
> > > of the message "signoff SERVLET-INTEREST".
> > >
> > > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > > Resources:
http://java.sun.com/products/servlet/external-resources.html
> > > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> > >
> >
> >
___________________________________________________________________________
> > To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources: http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html