Hi Jon and others,

I have been following Turbine and other activity
for a while and we thought of trying to use it.
-- I missed the sumit as I had to be out of town that day :(
Certainly wish I could have made it.

We have been trying to use WebMacro and Turbine.
Let me say we are impressed with Turbine functionality,
of what we have seen. Hoping we can manage to understand
the intricacies..  eventually.

Our current set up is Apache with jserv, with lots of
servlets with html code in it! :) So time to move to
webmacro or JSP. Webmacro certainly appears clean.

We have configured Turbine with jserv, and then
have run around a lot figuring out how to get webmacro
to work as documented in turbine/docs.

Firstly, the docs indicate: better use tomcat with webmacro.
So we started with tomcat. Thought of switching the development
efforts to tomcat. After a couple of days of trying to configure
tomcat, turbine and webmacro as per documentation (and
our intution) I thought of asking for help.

Here I am also writing all the typos (or points for doc upgrades).

1. there seem to be some documentation by Jon.
    The docs are mostly for jserv. Jon even claimed
     he only assits in development of tomcat. But does
     not use it. However, there is what looks like a nice
     facility in Turbine to generate a structure that can
     be useful for using Turbine and webmacro with Tomcat
     turbine-war-webmacro/ directory
     [probably due to updating of certain tomcat features
      this has not been usable, see below]

2. other documentation by others.
    The docs appear to indicate that tomcat is the way
    of the future and just start using it now, with webmacro.
    However, there are missing parts while reading the
    few docs pages on what to make of it, while trying
    the examples or pointers during installation.
    Jon says: try the example by typing:
       http://www.mycompany.com/servlets/Turbine/screen/HelloWorld
    which is valid only in jserv (using default settings)
    When I started following this but somehow by trial and error found
    that i had to use servlet not servlets while using tomcat.
       http://www.mycompany.com/servlet/Turbine/screen/HelloWorld
    reacts. However, the rest of the docs about using turbine-war-webmacro
    also have little inconsistencies that make it hard to understand
    how to get it all going.

    One of the big problems is that according to the docs, we end
    up creating two sets of Turbine instantiations.
     (one in tomcat/conf/TurbineResources.properties
         [we put this in ROOT/WEB-INF/conf -- and changed ROOt web.xml
          appropriately, see below]
     and
      another in
turbine-war-webmacro/WEB-INF/conf/TurbineResources.properties
     )
     The two seem to get a tad confused with each other.
      If ever the tomcat/conf/TurbineResources.properties
      been seen by turbine, it will want to use the defaults in there,
      even if we are interested in :/turbine-war-webmacro/servlet/Turbine
      We have been able to progress with turbine-war-webmacro only if
      we never use the :/servlet/Turbine instantiation.

     Is this expected or is it expected that turbine picks up the
     TurbineResource.properties in the context and scopes it
     appropriately?

3. possibly the changing status of tomcat:
    the docs say use full path in web.xml
    but tomcat does not accept full path at all.
    only thing that makes sense to it is relative to WEB-INF
    [see below]

4. webmacro docs
    The docs are mostly for servletrunner.
    so not much help there for jserv or tomcat.
    we used the webmacro-jdk1.2-CVS.jar files in turbine.
    However, only accidentaly (once) have we been able
    to make webmacro read the appropriate
    WebMacroResources.properties file.

    According to tomcat, WEB-INF/classes is the place for classes
    and putting the WebMacroResources.properties here should
    make webmacro see that file. (ie., in the classpath).
    According to webmacro, the best place for it is where
    the webmacro jar file is... which is WEB-INF/lib/ (created by
    turbine). According to docs of turbine.. this file should be in
    WEB-INF/conf  (however, it is created in /classes). When the
    webmacro properties is in the lib/ dir, I think the file was noticed
    as the webmacro logs were updated.
    But Turbine never seem to resolve [template, screen/error.wm]

I hope that the above kind of indicate where our problems or confusion
might be. If any one who uses tomcat and webmacro with turbine, and
are willing to share some thoughts or  even the various turbine properties
and web macro properties files, and the config layout (of tomcat) that
woul dbe great.
As of now, we have not put much effort into getting webmacro to work
with jserv and turbine (or even just jserv) as according to the docs,
that is a harder route than the tomcat one (:servlet 2.2 requirements)

thanks much for any help, also thanks all for the great dev activity..
even though the docs appear not to be updated.. it certainly makes
the whole this want to be tried.. so thanks for the effort on docs!
Hope you dont mind my detailed remarks to the list.

-dinesh

The typos/inconsistencies in the documentation:

from  ../turbine/docs/install.txt

----------------------------------------------------------------------------
---
INSTALLATION WITH TOMCAT
----------------------------------------------------------------------------
---
The following instructions assume that you have followed the above
instructions for either source compilation or release distribution.  It
also assumes that you have working Tomcat installation which can be
found at http://jakarta.apache.org.

TOMCAT_HOME=/path/to/tomcat

#1. Put all necessary Turbine-related jars (Turbine, ECS, Village,
JNDI) into $TOMCAT_HOME/lib.

#2. Add the path to the jars to the existing Tomcat CLASSPATH found in
$TOMCAT_HOME/bin/tomcat.sh

#3. Make necessary adjustments to TurbineResources.properties and copy into
$TOMCAT_HOME/conf

#4. Add the following xml to $TOMCAT_HOME/conf/web.xml. It
will be a child of the <web-app> element.

<servlet>
    <servlet-name>Turbine</servlet-name>
    <servlet-class>Turbine</servlet-class>
    <init-param>
        <param-name>properties</param-name>

<param-value>/path/to/$TOMCAT_HOME/conf/TurbineResources.properties</param-v
alue>
    </init-param>
</servlet>

#5. Restart Tomcat
-----------------

Tomcat does not appear to understand either the full path to
TurbineResources.properties
or any relative paths to  $TOMCAT_HOME/conf
only /WEB-INF/.. style relative paths work.  this makes it impossible to
refer to a path such as tomcat/conf/TurbineResources.properties
(which is where the file is and is supposed to be, according to the docs)

Error: 503

Location: /servlet/Turbine

java.lang.Exception: Turbine::init(ServletConfig) - The Turbine Resources
File -
'/usr/local/tomcat/webapps/ROOT/usr/local/tomcat/conf/TurbineResources.prope
rties' does not exist. Please create it or change the 'properties' Init
Parameter
Value to a file name that exists and contains the TurbineResources.

----------


> . build-turbine.sh war-webmacro

...

 Please edit
../turbine-war-webmacro/WEB-INF/conf/TurbineResources.properties and
 ../turbine-war-webmacro/WEB-INF/conf/WebMacro.properties to specify the
correct settings
 as defined in the ../docs/install.txt file. The TemplatePath= Webmacro
 setting will be the path to your WAR archive/WEB-INF/templates

The file ../turbine-war-webmacro/WEB-INF/conf/WebMacro.properties does not
exist

The file is in ../turbine-war-webmacro/WEB-INF/classes/WebMacro.properties


Also the same error/typo is in the docs file ../docs/war-webmacro.html:

  In the conf/ directory, the build script will place a copy of the
turbine/conf/Webmacro.properties and the
turbine/conf/TurbineResources.properties files.

Also the next line says:
 In the various templates directories, the build script will copy the
various turbine/examples/webmacro/ .wm files.

However, the examples in turbine/examples/webmacro/ are kind of different
than the ones in WEB-INF

Another typo:
 "you will want to define the modules= line"

modules= should be modules.packages=   (twice)





------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to