Return-Path: Delivered-To: apmail-incubator-jspwiki-user-archive@locus.apache.org Received: (qmail 91809 invoked from network); 28 Nov 2007 09:14:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 28 Nov 2007 09:14:06 -0000 Received: (qmail 99326 invoked by uid 500); 28 Nov 2007 09:13:54 -0000 Delivered-To: apmail-incubator-jspwiki-user-archive@incubator.apache.org Received: (qmail 99313 invoked by uid 500); 28 Nov 2007 09:13:54 -0000 Mailing-List: contact jspwiki-user-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-user@incubator.apache.org Delivered-To: mailing list jspwiki-user@incubator.apache.org Received: (qmail 99304 invoked by uid 99); 28 Nov 2007 09:13:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2007 01:13:54 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jalkanen@ecyrd.com designates 193.64.5.122 as permitted sender) Received: from [193.64.5.122] (HELO mail.ecyrd.com) (193.64.5.122) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2007 09:13:33 +0000 Received: by mail.ecyrd.com (Postfix, from userid 1001) id 2EC6B4827D; Wed, 28 Nov 2007 11:13:20 +0200 (EET) Date: Wed, 28 Nov 2007 11:13:20 +0200 From: Janne Jalkanen To: jspwiki-user@incubator.apache.org Subject: Re: JSPWiki "Special Pages" Message-ID: <20071128091319.GA19539@ecyrd.com> References: <96b3ced80711260850t4be90e05n9b049b56875cdf78@mail.gmail.com> <474B399C.6090609@net-frame.com> <96b3ced80711270009k29210e23v17ca40e62cb77662@mail.gmail.com> <474C38DA.3070708@net-frame.com> <96b3ced80711280048q51bb76c5r10929514cdbca993@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <96b3ced80711280048q51bb76c5r10929514cdbca993@mail.gmail.com> User-Agent: Mutt/1.5.11 X-Virus-Checked: Checked by ClamAV on apache.org Any JSP page or plugin can request custom scripts to be added to the 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 : > > > > ... 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 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