On Fri, 11 Jan 2002, Creighton Kirkendall wrote:

> Date: Fri, 11 Jan 2002 12:39:08 -0500
> From: Creighton Kirkendall <[EMAIL PROTECTED]>
> Reply-To: Tomcat Developers List <[EMAIL PROTECTED]>
> To: 'Tomcat Developers List' <[EMAIL PROTECTED]>
> Subject: RE: shell connector
>
> I think that you could use the Rhino shell to be this shell.  You would have
> to write an initializer so that all of the command objects that you wanted
> to work on where available.  This would fit nicely with some of my ideas on
> how to wrap different commands.  You could simply use the HTTP connection
> class in initialization to execute the commands. You would have to write a
> script that ran the initializer before you return the shell to the user.
> Bellow is some rhino code that I think could initialize the reload web app
> command.  This is vary basic it does not take authentication or error
> handling into account.  It is just to illustrate the point.  I do not know
> rhino that well, I just started playing today.
>
> defineClass("java.net.URL");
> defineClass("java.net.HTTPConnectionClass");
> server="localhost:8080";
> function reload(webapp) {
>       url=new URL("http://"+server+"/manager/reload?path="+webapp);
>       conn=url.OpenConnection();
>
>       // code to return the results.
>       // I think a wrapper for the connection
>       // object is probably required to handle
>       // exception well.
> }
>
> Creighton Kirkendall
>

You might also be amused by some Ant tasks for all the basic Manager
servlet functions that I committed to the HEAD branch yesterday.  Now you
can do things like install and reload apps directly from your build
scripts.

Docs are on the "manager-howto.html" page in last night's nightly build.

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to