You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Nicola Ken Barozzi <ni...@apache.org> on 2002/10/27 23:14:19 UTC

Forrest with embedded Jetty: it works!

I looked at Jetty today while evalutaing the possibility of using 
instead a smaller homebacked server, when I realised how simple it is to 
"embed" jetty in the Forrest system.

On my computer I just do "forrest jetty" and can see the site in my 
browser on localhost:8888 .

Just one thing: is the Jetty license ok with us?
It's an artistic license, so generally it can be ok, but I read that it 
has some limitations.

Can someone please check that we can put it in CVS?

Thanks :-)

[still on 9.6k GSM ]

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: Forrest as a desktop tool? (was: Re: Forrest with embedded Jetty: it works!)

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Bertrand Delacretaz wrote:
 > On Wednesday 30 October 2002 15:40, Nicola Ken Barozzi wrote:
 >
 >>. . .
 >>I prefer the scripts... any tip on how to make it nicer without needing
 >>scripts? Maybe a java commandline that pops up with
 >>
 >>   java -jar forrest.jar
 >
 >
 > I think desktop-oriented users might like the following scenario:
 >
 > -download forrest.jar, contains everything
 > -double-click forrest.jar (assuming proper JVM setup) or use java -jar
 > -java GUI comes up, asks user to select working directory
 > -GUI says "please connect to http://localhost:1234..."
 >
 > Could also be done using Java Web Start, in which case Forrest could be
 > started directly from xml.apache.org/forrest.
 >
 > If you can integrate slash-edit + chaperon to allow structured text
 > editing...well, you can put me on your "people that owe me a beer" 
list ;-)
 >
 > Forrest then becomes a really cool and easy to use content editing
 > system...
 >
 > This is similar to what Jeff said today in his RT, but maybe more 
targeted
 > towards "desktop-minded" users.

Yes, I think you have a point to drive installation to be this easy, and
this is the way to go.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Forrest as a desktop tool? (was: Re: Forrest with embedded Jetty: it works!)

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
On Wednesday 30 October 2002 15:40, Nicola Ken Barozzi wrote:
>. . .
> I prefer the scripts... any tip on how to make it nicer without needing
> scripts? Maybe a java commandline that pops up with
>
>    java -jar forrest.jar

I think desktop-oriented users might like the following scenario:

-download forrest.jar, contains everything
-double-click forrest.jar (assuming proper JVM setup) or use java -jar
-java GUI comes up, asks user to select working directory
-GUI says "please connect to http://localhost:1234..."

Could also be done using Java Web Start, in which case Forrest could be 
started directly from xml.apache.org/forrest.

If you can integrate slash-edit + chaperon to allow structured text 
editing...well, you can put me on your "people that owe me a beer" list ;-)

Forrest then becomes a really cool and easy to use content editing 
system...

This is similar to what Jeff said today in his RT, but maybe more targeted 
towards "desktop-minded" users.

-Bertrand

Re: Forrest with embedded Jetty: it works!

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Bertrand Delacretaz wrote:
> On Sunday 27 October 2002 23:14, Nicola Ken Barozzi wrote:
> 
>>. . .
>>Just one thing: is the Jetty license ok with us?
>>It's an artistic license, so generally it can be ok, but I read that it
>>has some limitations.
>>. . .
> 
> 
> IANAL nor a specialist in ASF licenses, but the Jetty license at 
> http://jetty.mortbay.org/jetty/LICENSE.html says
> 
> "You may make and distribute verbatim copies of the compiled form of the 
> Standard Version of this Package without restriction, provided that you 
> include this license."
> 
> so I guess it should be ok?

Yes, I finally got time to download the license and read it myself.
It says it's an Artistic license, but actually it's more an Apache-type 
license, so IANAL but from my experience it's OK.

> Being able to run Forrest with zero installation (from a single jar, using a 
> custom class loader?) would be great IMHO...

It can be done quite easily really, we just need a forrest.jar that 
makes the call to Ant, and starts the process.
The only thing is that it will need the dir of the project so it will be:

java -jar forrest.jar path/to/my/project

I prefer the scripts... any tip on how to make it nicer without needing 
scripts? Maybe a java commandline that pops up with

   java -jar forrest.jar

in which I can cd in the project dir and launch forrest?

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: Forrest with embedded Jetty: it works!

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
On Sunday 27 October 2002 23:14, Nicola Ken Barozzi wrote:
>. . .
> Just one thing: is the Jetty license ok with us?
> It's an artistic license, so generally it can be ok, but I read that it
> has some limitations.
>. . .

IANAL nor a specialist in ASF licenses, but the Jetty license at 
http://jetty.mortbay.org/jetty/LICENSE.html says

"You may make and distribute verbatim copies of the compiled form of the 
Standard Version of this Package without restriction, provided that you 
include this license."

so I guess it should be ok?

Being able to run Forrest with zero installation (from a single jar, using a 
custom class loader?) would be great IMHO...

-Bertrand

Re: [RT] Forrest 1.0 thoughts (Re: Forrest with embedded Jetty: it works!)

Posted by Jeff Turner <je...@apache.org>.
On Wed, Oct 30, 2002 at 03:48:34PM +0100, Nicola Ken Barozzi wrote:
...
> >3) Users can now edit XML docs with whatever tools they want, and
> >instantly see them at http://localhost:8888/<whatever>
> 
> Exactly.
> Or also edit it in html with Mozilla Composer or such, and have Forrest 
> transform it to XML.
> 
> This is quite easy to do with the html generator, and I'm doing that too.

HTML to XML?  Bizarre.. I suppose there could be XPaths in comments,
linking back to the original XML.. would certainly be convenient.

> The question is: how do we define sections in HTML?
> 
> >4) (optional) From the admin interface, we can have a 'editor' webapp,
> >which deploys itself over another project, and allows the user to edit
> >the XML through their web browser with Xopus or somesuch tool.
> 
> 
> 
> >Hmm.. how does that sound?  Technically it's not that far away.. just
> >requires a change in thinking: Forrest as a live interactive
> >application, a Cocoon webapp that manages other Cocoon webapps.. much
> >like what Stefano/Carsten are talking about for managing blocks in C2.2.
> >
> >Thoughts?
> 
> I agree, in fact it's the direction I'm taking now.
> Thanks to your idea of pushing towards using the webapp to see changes 
> instantly, this has become a natural way of progressing with forrest.

Good stuff.

> Technically, I would keep all these actions as Ant scripts, so that they 
> can be called by the Forrest admin webapp or by commandline.
> This follows the UNIX philosophy of having all commandline and making 
> GUIs on top of it.

+1

> We just need an AntAction, and it will be a piece of cake.

On avalon-dev someone once posted an Ant block for Phoenix:

http://marc.theaimsgroup.com/?t=103060426600001&r=1&w=2

With that, the AntAction would just lookup AntServer.ROLE and tell it the
location of the Ant script to run.

Mm.. would be nice to expose the whole Forrest management API via a set
of URLs, REST-style.

> Any takers for it?

Anyone? :)  I'm busy with Maven plugins 'n stuff..

> Jeff, when you have committed your refactoring I will make the necessary 
> changes to host Jetty, and will commit it, along with the drafts of my 
> primitive inline wiki editor.

Great, I look forward to playing.


--Jeff

> -- 
> Nicola Ken Barozzi                   nicolaken@apache.org
>             - verba volant, scripta manent -
>    (discussions get forgotten, just code remains)
> ---------------------------------------------------------------------
> 

Re: [RT] Forrest 1.0 thoughts (Re: Forrest with embedded Jetty: it works!)

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Jeff Turner wrote:
> On Sun, Oct 27, 2002 at 11:14:19PM +0100, Nicola Ken Barozzi wrote:
> 
>>I looked at Jetty today while evalutaing the possibility of using 
>>instead a smaller homebacked server, when I realised how simple it is to 
>>"embed" jetty in the Forrest system.
>>
>>On my computer I just do "forrest jetty" and can see the site in my 
>>browser on localhost:8888 .
> 
> 
> Mmm..  So, where do we want to go with this?

Good you started this thread, I can just reply without writing the whole 
mail :-)

> FWIW, here's one picture for what Forrest 1.0 could look like..  I'm
> imagining from the POV of a Windows user to whom command-lines are
> primitive scary things..

Yes, this is an important point IMNSHO.

> 1) Download Forrest, go to 'bin' folder, click the 'go' icon.  Chugchug..
> and IE launches, pointing to http://localhost:8888/forrest.  From here
> on, users never touch the command-line again.

Ok, quite simple here.

> 2) The 'forrest' webapp manages everything in Forrest.  From the user's
> POV, it IS Forrest.  It does the following:
>  - Lists currently deployed Forrest projects as a set of links:
>      http://localhost:8888/anteater
>      http://localhost:8888/xml-site
>      http://localhost:8888/apache-incubator
>      http://localhost:8888/xindice
>      ...
>    Each link has a 'static snapshot' button next to it, which kicks off
>    the Cocoon CLI and generates a set of HTML files for that site.

Yes :-)

>  - Provides an interface for setting up new projects, through a set of
>    forms asking:
>    - Where is the new project located?
>    - Does it have any docs, or should we 'seed' it?
>    - What skin does the user want (screenshots to illustrate)
>    - Questions about the site used to populate skinconf.xml and any other
>      site config files.
> 
>    Done!  Project is now deployed and listed from the forrest webapp home
>    page.

Yeah!

> Technically, the Forrest webapp is just a rebranded version of the
> standard 'admin' webapp that comes with Tomcat (or whatever we use).
> What we present to the user as a 'Forrest site' is a webapp context.

Yes, something like this.

> 3) Users can now edit XML docs with whatever tools they want, and
> instantly see them at http://localhost:8888/<whatever>

Exactly.
Or also edit it in html with Mozilla Composer or such, and have Forrest 
transform it to XML.

This is quite easy to do with the html generator, and I'm doing that too.

The question is: how do we define sections in HTML?

> 4) (optional) From the admin interface, we can have a 'editor' webapp,
> which deploys itself over another project, and allows the user to edit
> the XML through their web browser with Xopus or somesuch tool.



> Hmm.. how does that sound?  Technically it's not that far away.. just
> requires a change in thinking: Forrest as a live interactive
> application, a Cocoon webapp that manages other Cocoon webapps.. much
> like what Stefano/Carsten are talking about for managing blocks in C2.2.
> 
> Thoughts?

I agree, in fact it's the direction I'm taking now.
Thanks to your idea of pushing towards using the webapp to see changes 
instantly, this has become a natural way of progressing with forrest.

Technically, I would keep all these actions as Ant scripts, so that they 
can be called by the Forrest admin webapp or by commandline.
This follows the UNIX philosophy of having all commandline and making 
GUIs on top of it.

We just need an AntAction, and it will be a piece of cake.

Any takers for it?

Jeff, when you have committed your refactoring I will make the necessary 
changes to host Jetty, and will commit it, along with the drafts of my 
primitive inline wiki editor.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


[RT] Forrest 1.0 thoughts (Re: Forrest with embedded Jetty: it works!)

Posted by Jeff Turner <je...@apache.org>.
On Sun, Oct 27, 2002 at 11:14:19PM +0100, Nicola Ken Barozzi wrote:
> 
> I looked at Jetty today while evalutaing the possibility of using 
> instead a smaller homebacked server, when I realised how simple it is to 
> "embed" jetty in the Forrest system.
> 
> On my computer I just do "forrest jetty" and can see the site in my 
> browser on localhost:8888 .

Mmm..  So, where do we want to go with this?

FWIW, here's one picture for what Forrest 1.0 could look like..  I'm
imagining from the POV of a Windows user to whom command-lines are
primitive scary things..

1) Download Forrest, go to 'bin' folder, click the 'go' icon.  Chugchug..
and IE launches, pointing to http://localhost:8888/forrest.  From here
on, users never touch the command-line again.

2) The 'forrest' webapp manages everything in Forrest.  From the user's
POV, it IS Forrest.  It does the following:
 - Lists currently deployed Forrest projects as a set of links:
     http://localhost:8888/anteater
     http://localhost:8888/xml-site
     http://localhost:8888/apache-incubator
     http://localhost:8888/xindice
     ...
   Each link has a 'static snapshot' button next to it, which kicks off
   the Cocoon CLI and generates a set of HTML files for that site.

 - Provides an interface for setting up new projects, through a set of
   forms asking:
   - Where is the new project located?
   - Does it have any docs, or should we 'seed' it?
   - What skin does the user want (screenshots to illustrate)
   - Questions about the site used to populate skinconf.xml and any other
     site config files.

   Done!  Project is now deployed and listed from the forrest webapp home
   page.

Technically, the Forrest webapp is just a rebranded version of the
standard 'admin' webapp that comes with Tomcat (or whatever we use).
What we present to the user as a 'Forrest site' is a webapp context.


3) Users can now edit XML docs with whatever tools they want, and
instantly see them at http://localhost:8888/<whatever>

4) (optional) From the admin interface, we can have a 'editor' webapp,
which deploys itself over another project, and allows the user to edit
the XML through their web browser with Xopus or somesuch tool.


Hmm.. how does that sound?  Technically it's not that far away.. just
requires a change in thinking: Forrest as a live interactive
application, a Cocoon webapp that manages other Cocoon webapps.. much
like what Stefano/Carsten are talking about for managing blocks in C2.2.

Thoughts?


--Jeff