But how do you call the custom JSP in the first place (from within JSPWiki)?

Janne Jalkanen wrote:
Any JSP page or plugin can request custom scripts to be added to the
<head> by calling TemplateManager.addResourceRequest().  No need to
rewrite ViewTemplate.

/Janne

On Wed, Nov 28, 2007 at 09:48:13AM +0100, Matthias Käppler wrote:
Hi,

2007/11/27, Terry Steichen <[EMAIL PROTECTED]>:
...  With that
caveat, I'll give you a few thoughts on how I use custom JSP pages with
JSPWiki.
...
Thanks for your explanations.

What was really making trouble was the linking of script files in the JSP
that will be included as a special page. These scripts would be included as
part of the "pageContent" DIV, which itself was part of a HTML table and
HTML does not allow script tags at this point.
I solved the problem by rewriting ViewTemplate so that in <head> it checks
for the current request context and if it matches my special page, it will
include a MyCoolPageHeader.jsp containing all script tags. However, this
means that for every special page I would have to modify ViewTemplate and
check for some specific request context. Not the most beautiful of
approaches, but it works.

Having said all this, I invite Andrew to comment.  He's a very smart guy
who knows a LOT more about security than do I.  There may be some
problems in this approach I'm not aware of.  (As I prepare to post this,
I notice that Andrew seems to have shifted his view a bit, but I'd still
like his comments about this approach.)
Sure. I was just somewhat surprised by his answer, but he already said it
was a misunderstanding so no problem here. My apologies if I didn't make
myself clear enough in the first place.

Thanks,
Matthias

Reply via email to