incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Kitching ...@ops.co.at>
Subject Re: Embedding jspwiki in another app
Date Tue, 15 Jan 2008 08:29:44 GMT
Hi Neil,

Thanks for your reply.

Neil Miller schrieb:
> Simon Kitching wrote:
>> I'm trying to use jspwiki as the "help engine" for an internal
>> application. The intention is that documentors write help for a
>> web-application using jspwiki, then we bundle up the pages and include
>> them *plus the necessary jspwiki infrastructure to render them* in our
>> .war file. Initially it would be view-only, but later we might try to
>> implement a custom "page provider" (?) to allow users to modify the
>> default pages, with a database used as backing storage.
>>
>> I'm just starting on this, and before I spend too much time: has anyone
>> done anything similar?
>>   
> Yes, I have. Not exactly as a help engine, but similar embedding
> situation.

It's great to hear this can be made to work!

>> The first issue I expect to strike is that the url triggering jspwiki
>> will be of form "/ourwebapp/help/Wiki.jsp?page=ZZZ". Does jspwiki run ok
>> under a path that is not the webapp root?
>>   
> I haven't yet tried this under 2.6, but in 2.4 it did not. However it
> wasn't that hard to patch the code to get it working. I have that code
> and could sent it too you, or if Janne thinks it's worth it I could
> make a patch for 2.6 out of it, though that would definitely require
> some clean up, and testing.

I guess I can figure it out myself (the code is *wonderfully* well
commented) but whatever is easy for you to provide would be greatly
appreciated.

I suspect the core developers will be pretty busy with the move to
Apache over the next few weeks, and probably aren't too keen on patches
to change things like this at the current time..

>> The second issue is that I would really prefer to avoid unpacking the
>> jspwiki resource files (jsp, js, images, config-files) into the "main"
>> war, 
> We unpacked and merged. JSPs, javascript, and the like, all went in a
> subdirectory, aka, "/ourwebapp/help/". If you're running read-only you
> really don't need any of that however, as you can write a custom
> servlet that will load the wiki text and pass it to the WikiRenderer
> to get your output HTML (this is a bit of a simplification, but pretty
> close), then all you need is the JAR. We actually did both or the
> methods described. One context was running read-only where the content
> was displayed in pages with tightly integrated L&F, and the other
> context was an administrative one for editing.
>
Aren't most of the jsps needed even in just read-only mode? I can see
how the "controller" pages Wiki.jsp, Edit.jsp, etc can be replaced with
servlets fairly easily. But as I currently understand the code, a lot of
the others (eg ViewTemplate.jsp, ViewContent.jsp) are critical for
correct rendering of a page, even when WikiRenderer is called directly.
Have I misunderstood something?

And with an unpacked approach, how do you handle an upgrade to a new
JspWiki release?

Regards,

Smion


Mime
View raw message