Sam Rose wrote:
> What about SQL plus for oracle?
>
Are you saying that you'd like to provide a web-based interface to SQL*Plus? It
gets a little interesting dealing with an interactive program, because of the
stateless nature of HTTP. Here's one general approach that might work.
* The first time your servlet is invoked, use an
java.lang.Runtime.exec() to create a Process
object representing a connection to SQL*Plus
running in a separate process.
* Stash the Process object in an HttpSession
so that the same user is returned to the same
Process every time. (There will be one of these,
and one external process running SQL*Plus, for
each concurrent user).
* On each request, call getOutputStream()
on the Process object and pass in the command.
Then, call getInputStream() and read
the response -- you'll have an interesting time
figuring out when it is finished -- maybe look
for the prompt string?
* Format the response you've received in HTML,
and send it back to the user.
* Provide some mechanism for shutting down the
external process when the user is done, or when
the session times out.
Given all of this, wouldn't it just be easier to give the user a TELNET login so
they can execute SQL*Plus themselves?
Craig McClanahan
___________________________________________________________________________
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