[opencms-dev] 回复: jsp srcipt in OpenCms 8.5.1
Leon
happysky8090 at qq.com
Wed Jun 12 04:30:57 CEST 2013
Hi,all,
i have done with it.
Regards.
org.opencms.jsp.CmsJspActionElement jsp = new org.opencms.jsp.CmsJspActionElement(pageContext, request, response);
org.opencms.file.CmsObject cmsObject = jsp.getCmsObject();
org.opencms.jsp.util.CmsJspStandardContextBean contextBean = org.opencms.jsp.util.CmsJspStandardContextBean.getInstance(request);
org.opencms.jsp.util.CmsJspVfsAccessBean vfsBean = org.opencms.jsp.util.CmsJspVfsAccessBean.create(cmsObject);
org.opencms.file.CmsResource cmsRes = (org.opencms.file.CmsResource)vfsBean.getResource().get(contextBean.getElement().getSitePath());
String resId = cmsRes.getStructureId().getStringValue();
------------------ 原始邮件 ------------------
发件人: "Leon"<happysky8090 at qq.com>;
发送时间: 2013年6月12日(星期三) 上午9:18
收件人: "The OpenCms mailing list"<opencms-dev at opencms.org>;
主题: Re: [opencms-dev] jsp srcipt in OpenCms 8.5.1
Hi Paul,
Yes i am.
And i want to find the way with jsp script, not jstl.
I have no idea with it.
Regards.
Leon
------------------ Original ------------------
From: "Paul-Inge Flakstad"<flakstad at npolar.no>;
Date: Tue, Jun 11, 2013 08:58 PM
To: "The OpenCms mailing list"<opencms-dev at opencms.org>;
Subject: Re: [opencms-dev] jsp srcipt in OpenCms 8.5.1
Hi Leon, Are you looking to get the structure ID of the requested file? -Paul Sendt fra min Sony Xperia™-smarttelefon Leon <happysky8090 at qq.com>: Hi,all
I have to use jsp script instead of jstl in OpenCMS8.5.1,
${cms:vfs(pageContext).resource[cms.element.sitePath].structureId}
I have no idea changing above jstl to jsp script, Can anyone know it.
Regards
Leon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20130612/fc7b5224/attachment.htm>
More information about the opencms-dev
mailing list