Thanks very much so far. The code you gave would need to run in a plugin with a servlet, would it?
So, I'll have a look at http://www.jspwiki.org/wiki/PluginCookbook#section-PluginCookbook-WritingAServletForAWikiPlugin I saw that Janne wrote a DAV paper: http://meta.wikimedia.org/wiki/Transwiki:Wikimania05/Paper-JJ1 but this only allows attachment-uploads, does it? Juergen Frank Fischer-2 wrote: > > weberjn schrieb: >> We'd like to export some information from UML models into Wiki pages and >> use >> JSPWiki as read-only viewer for it. The result should be similar to >> Javadoc >> (but it is not about Java). >> It seems to be easier to generate wiki pages than to generate static HTML >> pages, does it? >> >> I see two problems here: >> >> o How does JSPWiki know that there are new or changed pages in the >> file-system and especially, how do you make Lucene see the changes? Is >> there >> an API (e.g. a servlet) that you can call to make JSPWiki reload its page >> cache? > > You should not write directly to the file system, but use > the saveText( WikiContext context, String text ) method in > com.ecyrd.jspwiki.WikiEngine: > > -----snip-------------------------------------------------- > > Wiki Context context; // you need a WikiContext object > String pageName; // the wiki name of the page > String author; // the author of the page > String text; // the wiki markup you want to store > > try { > WikiEngine engine = context.getEngine(); > WikiPage page = engine.getPage(pageName); > if (page == null) page = new WikiPage(engine, pageName); > WikiContext newContext = (WikiContext)(context.clone()); > newContext.setPage(page); > page.setAuthor(author); > engine.saveText(newContext, text); > } catch(WikiException e) { > } > > -----snip-------------------------------------------------- > > This should store a new version of the page and present > the text to Lucene. > > >> o How do you make the pages read-only? Generate ALLOW tags into the >> pages? > > Yes. > > Frank > > -- View this message in context: http://www.nabble.com/Viewer-for-generated-pages---Lucene-refresh-tp19218006p19219345.html Sent from the JspWiki - User mailing list archive at Nabble.com.
