Thanks Mike,
Both solution works for me,
And as You sad second is much more elegant.
Thanks again,
Denis Balog
On Wed, Apr 9, 2008 at 10:08 AM, Mike Meijnhard
<[EMAIL PROTECTED]> wrote:
> Hi Denis,
>
> The urlBasePath value is not available in a JSP. This value is used to
> initialize the webdav service (to either the
> preview or live context) and then discarded.
> You can retrieve the base path of the repositorycontext with
> ${repository.basePath} in a JSP.
> This base path has properties filesPath, fullPath and rootPath you can
> use. For instance
> ${repository.basePath.filesPath} for the files path of the repository
> context currently used.
>
> But I can imagine this doesn't really fit your needs. A simple way to
> obtain the urlBasePath value is to make two
> filters, one with a mapping for /preview and one for /live and they need
> to be defined before the HST filters.
> They only have to set an attribute on the request with the appropriate
> value, either preview or live.
> In this way you have the value of urlBasePath available as the request
> attribute in your JSP.
>
> Best Regards,
>
> Mike Meijnhard
> Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466
> San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA
> 94952-3329 +1 (707) 773-4646
>
> www.onehippo.com
> <file:///C:/Documents%20and%20Settings/mmeijnhard/Application%20Data/Mic
> rosoft/Signatures/www.onehippo.com> [EMAIL PROTECTED]
>
> -------- Original Message --------
>
> Subject: [HippoCMS-dev] JSP toolkit
>
> Date: Mon, 7 Apr 2008 13:21:34 +0200
>
> From: Denis Balog <[EMAIL PROTECTED]>
>
> Reply-To: Hippo CMS development public mailinglist
> <[email protected]>
>
> To: Hippo CMS development public mailinglist
> <[email protected]>
>
>
>
> Hi all,
>
> Can you help me with this.
>
> I'm using JSP hippo tollkit and everything is OK.
>
> I need to know in JSP template (that I dispatch to) what is value of
> "urlBasePath" (/preview or /live)
>
> is there any way to access it?
>
> Thanks in advance,
>
> Denis Balog.
>
> ********************************************
> Hippocms-dev: Hippo CMS development public mailinglist
>
********************************************
Hippocms-dev: Hippo CMS development public mailinglist