forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lake McManus <lake...@gmail.com>
Subject RE: Forrest as a Module
Date Tue, 30 Aug 2005 07:31:17 GMT
Alright well if I haven't already made it blatantly obvious, I'm new to the whole Forrest/Cocoon
thing, and the documentation is hardly useful for someone trying to figure out how to use
it and more useful as a reference for someone who already knows it.  I'm also inexperienced
with servlets, containers, and webapps, though I do know Java.  Would you mind explaining
how I would integrate Forrest, along with other components such as PHP, into an Apache server,
using what you mentioned below?  Thank you so much for your help, and for putting up with
me!

--
Lake McManus~马雷~レイク・ミクマーナス~ْلَيكْ مِكْمَنُس~लेक्
मिक्मानस
E-Mail: LakeHMM@gmail.com
"Impermanent are all created things; strive on with awareness."

-----Original Message-----
From: Ross Gardler [mailto:rgardler@apache.org] 
Sent: 2005 August 27 09:33
To: user@forrest.apache.org
Subject: Re: Forrest as a Module

Lake McManus wrote:
> In my opinion, Forrest would be much more useful as a module.

Forrest is a webapp for hosting in a Servlet engine. It is a completely 
different beast to an HTTPD module (I guess that is what you mean by 
module). Of course, the servlet container itself can be run as an HTTPD 
module.

>  Despite 
> what the Forrest website says, I can’t understand how Forrest can be 
> used for dynamic pages

See our home page [1] and the docs at [2] which describes the dynamic 
mode in more detail.

In short you can do 'forrest run' and point your browser at 
http://localhost:8888 (the port is of course configurable, and you can 
poit at it from an external machine if you want to). In a production 
environment you probably want to do 'forrest webapp' and deploy on your 
favourite servlet container.

[1] http://forrest.apache.org/#Static+or+Dynamic
[2] http://forrest.apache.org/docs_0_70/your-project.html#webapp

>Making it a module would allow this.  That 
> would make a lot more sense than having to run Forrest every time you 
> update the site, especially if you’re not running Forrest on the 
> server.  At first I thought Forrest would be something like that, but it 
> took me a while to realize, to my dismay, that it wasn’t.

On the contrary - that is *exactly* what forrest does when you run in 
dynamic mode. You should also appreciate that Forrest is designed to 
allow static content to be created since most content is, in fact, 
static and therefore is much more efficiently served by a web server. If 
you have dynamic needs then run in dynamic mode.

>  Having 
> Forrest as a module would also increase functionality with server-site 
> scripting like PHP.  That way, PHP could produce Forrest-compatible 
> code, and then Forrest would process it.

It already can. This is made really easy with the locationmap in 
0.8-dev, however, it is still achievable in 0.7 if you write a custom 
sitemap for your project.

Furthermore, Forrest is built on top of Cocoon, so we have the full 
power of Cocoon in the dynamic environment.

>  Is there any effort being made 
> toward this?  

Errr... just in case you haven't noticed with my replies above, it 
already does everything you ask for :-P

> And is there a reason that it wasn’t developed like a 
> module or CGI in the first place?

Because it is much more powerful and efficient as a Cocoon application.

Ross


Mime
View raw message