incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Murray Altheim <murra...@altheim.com>
Subject Re: Standalone parser: how to?
Date Mon, 12 Nov 2007 04:20:27 GMT
[moved over from jspwiki-users]

Murray Altheim wrote on jspwiki-users:
> I seem to remember there was a recent question on obtaining an instance
> of a JSPWikiMarkupParser, and now that I'm trying to do exactly that it
> seems there isn't any way to do so...
>
> There's only one constructor for the class and that requires a
> WikiContext, which throws an IllegalArgumentException if either the
> WikiEngine or HttpServletRequest are null, which seems like an
> insurmountable barrier. It seems like there a number of places where
> one would hit an NPE on reference to a null m_engine. What to do in
> those cases where the WikiEngine seems necessary is of course unknown.
>
> Anyone been able to create a parser without a WikiEngine or HTTP
> server? I am running this as an embedded application but I'd like
> access to a parser when neither the WikiEngine nor Jetty are active.
> Another alternative would be to create a dummy WikiEngine outside of
> the context of Jetty.

Janne Jalkanen replied:
>
> Yes, you must create a WikiEngine.  However a dummy one is completely
> fine.  This is a dependency that we should probably get rid of in 3.0
> timeframe anyway.
>
> I would recommend using the RenderingManager interfaces instead of using
> the MarkupParser directly, but that's more or less a matter of taste.
[...]
> You can have multiple WikiEngines, no worries.  You probably want to be 
> careful a bit on the configuration you pass to the WikiEngine.

Okay, I've gone through the exercise of creating a partial installation
that only includes a few bits and pieces, where the properties file is
written by the parent application. As might be expected in this process
I keep hitting exceptions and then resolving them, with the WikiEngine
asking for more and more...

Now it wants web.xml. How unreasonable! (and where to put it? It isn't
found in a 'WEB-INF' directory for some reason). I just want a standalone
JSPWikiMarkupParser, not the whole servlet framework. Has anyone actually
created a JSPWikiMarkupParser without the rest? or at least only a
WikiEngine? I'm kinda wondering what the minimal setup is when one doesn't
need any pages, any templates, any logs, anything except a parser...

Murray

...........................................................................
Murray Altheim <murray07 at altheim.com>                           ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

       Boundless wind and moon - the eye within eyes,
       Inexhaustible heaven and earth - the light beyond light,
       The willow dark, the flower bright - ten thousand houses,
       Knock at any door - there's one who will respond.
                                       -- The Blue Cliff Record


Mime
View raw message