Hi Jeff,

Thanks for your help.

1.  I know understand where you're coming from.  With log4j, what I've 
always done is called something like

         PropertyConfigurator.configure(propFile);

when the app starts up.  There's a way that Velocity does it where in their 
src/"classes" tree they include a default properties file.  That file is 
always read in and is used to initialize their log4j system.  Also, there 
is a hook so you can override particular settings with an external 
file.  They use the apache ExtendedProperty class which is pretty 
nice.  For my needs, what I did is create an Initialize servlet which is 
loaded on startup before anything else.  There I call the log4j initializer 
and anything else I want -- like reading in a property file.

2.  Off my memory, it seemed that when I want friendship-velocity it gave 
in error when xalan couldn't be found.  I suppose that's because friendship 
does some xsl transformations.  Now, are you saying that if I don't do any 
xsl in my app, xalan doesn't need to be included?  That would be very nice....

3. I don't think having maverick.xml's location be overridden from an init 
variable will work.  That's because the init setting is in web.xml which is 
included in the war file.  What I'd like is a way to override it from 
outside.  This might relate back to 1, but if maverick had a properties 
file, say maverick.properties, it could easily include stuff like this.  Of 
course, then the question is how does the app find maverick.properties -- I 
suppose JNDI might have to be used and then the property is set in the 
servlet.xml file.

If you'd like any help proof-reading the manual, shoot me a copy.  :)

Thanks a lot,
Dan




At 05:12 AM 2/6/02 -0800, Jeff Schnitzer wrote:
> > From: Dan Finkelstein [mailto:[EMAIL PROTECTED]]
> >
> > Hi --
>
>Hi!
>
> > I'm using 2.0 beta 1.  When you're writing the doc for 2.0, the
>problems
> > I've been having might be useful to document.
>
>Thanks, this helps!
>
> > 1.  On loading, I get errors that log4j isn't properly configured.  I
> > added
> > a log4j initialization call in Dispatcher.init() and that seemed to do
>the
> > trick.  (I grepped the sources but didn't see any explicit
>initialization
> > occurring.  I also added simple properties file that log4j needed.)
>
>This is a FAQ in the yet-to-be-checked-in 2.0 manual.  First a caveat:
>I'm not an expert in log4j, so I might be off base here.
>
>My general feeling is that log4j is really something that the container
>should be initializing, outside of the webapp.  After all, you're
>typically going to want full logging when debugging, but minimal logging
>on the production box.  Producing separate WARs for testing and
>deployment is not only a hassle, it's rather risky.
>
>My habit has been to provide default initialization to the JVM on
>startup using
>-Dlog4j.configuration=file:/path/to/maverick/tools/log4j.properties.
>
> > 2.   When running friendship-velocity, it gave me errors that were
>only
> > resolved when I added in xalan.jar and xml-apis.jar.  I had to
>download
> > xalan from jakarta since it wasn't in the distribution.  The readme
>note
> > says to put them in the web server's lib directory.  Could the
>friendship
> > war have been built with these files inside, which is more typical?
>
>I'll update the documentation regarding the xml-apis.jar... since jaxp
>is moving into the JDK itself, it doesn't seem like something that
>should be included in the WARs.  Also, some containers put it on the
>classpath already, so this is really only a tomcat deployment issue.
>BTW, didn't a previous version of tomcat include jaxp?  I don't remember
>having this problem before... oh well.
>
>I'm hesitant to include xalan.jar in the distribution.  There are
>currently five sample applications in all of Maverick.  The xalan jar
>itself is 800K, and it would be included in each of the WARs plus the
>maverick/lib directory.  This would bloat the distributions by five megs
>or so.
>
>Also, not everyone uses xalan... theoretically, any jaxp-compliant
>processor will do, and some web containers (e.g. Orion) already include
>one.
>
> > 3.  I'm interested in distributing different "skins" which would run
> > alongside the war file.  Thus, I would like maverick.xml, the vm
>files,
> > html files, gif files, etc to live in a separate directory.  I think
> > maverick is wired to expect them inside right now.  What do you think
>of
> > this idea?
>
>It's definitely possible to have all the content (vm,html,images) in
>separate directories; paths are simply paths.  At the moment, the
>maverick config file is hard-coded to WEB-INF/maverick.xml, although
>this could easily be made into a servlet init parameter.  Is this what
>you have in mind?
>
>Also, would the shunting feature be of use to you for skinning?  You
>could define each skin as a mode, and define views for all the modes.  A
>custom Shunt could determine mode based on a session attribute.  This
>would allow you to keep a single list of commands and controllers, and
>the Controllers wouldn't have to know anything about skins.
>
>If you want separate files just for the view lists, you could use
>entities to make the parser assemble the XML file for you.  I figured
>out how this works (my sgml-fu grows stronger!) from reading the
>O'Reilly Docbook book.  I'll put it in the FAQ.
>
> > I'll probably have more questions later....   Thanks for any help,
>
>No problem, and thanks for your input!
>
>Jeff Schnitzer
>[EMAIL PROTECTED]


_______________________________________________
Mav-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mav-user

Reply via email to