gpt4 book ai didi

aem - 跟踪 sling jsp 分辨率和选择器与变量的使用

转载 作者:行者123 更新时间:2023-12-04 14:09:02 25 4
gpt4 key购买 nike

在 adobe AEM(又名 cq)中,对于给定的 url,是否可以查看正在调用哪些 jsp?

我们有示例代码,不是我们编写的,如果特定选择器存在或不存在,则匹配 2 组“基本”jsp - “m”代表移动设备。在基本 jsp 中,如果移动或桌面设备正在请求,则变量被设置为标记。

从那时起,不再使用其他选择器 - 仅检查变量以明确包含或不包含特定于移动设备的 jsp。

与仅使用选择器调用或不调用特定 jsp 不同的方法。

通过跟踪脚本解析,它有助于可视化和首次亮相,但这是基于 sling 的代码的常见模式吗?

最佳答案

您可以在 Web 控制台的“最近请求”选项卡(http://localhost:4502/system/console/requests 对于本地作者实例)中查看有关最近请求的详细信息。

输出类似于下面的输出,它应该给你足够的信息

  0 (2013-09-14 21:36:20) TIMER_START{Request Processing}
0 (2013-09-14 21:36:20) COMMENT timer_end format is {<elapsed msec>,<timer name>} <optional message>
0 (2013-09-14 21:36:20) LOG Method=GET, PathInfo=/.edit.html
0 (2013-09-14 21:36:20) TIMER_START{ResourceResolution}
1 (2013-09-14 21:36:20) TIMER_END{1,ResourceResolution} URI=/.edit.html resolves to Resource=JcrNodeResource, type=sling:redirect, superType=null, path=/
1 (2013-09-14 21:36:20) LOG Resource Path Info: SlingRequestPathInfo: path='/', selectorString='edit', extension='html', suffix='null'
1 (2013-09-14 21:36:20) TIMER_START{ServletResolution}
1 (2013-09-14 21:36:20) TIMER_START{resolveServlet(JcrNodeResource, type=sling:redirect, superType=null, path=/)}
1 (2013-09-14 21:36:20) TIMER_END{0,resolveServlet(JcrNodeResource, type=sling:redirect, superType=null, path=/)} Using servlet /libs/sling/servlet/default/edit.jsp
1 (2013-09-14 21:36:20) TIMER_END{0,ServletResolution} URI=/.edit.html handled by Servlet=/libs/sling/servlet/default/edit.jsp
1 (2013-09-14 21:36:20) LOG Applying Requestfilters
1 (2013-09-14 21:36:20) LOG Calling filter: org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
1 (2013-09-14 21:36:20) LOG Calling filter: org.apache.sling.explorer.post.POSTServletFilter
1 (2013-09-14 21:36:20) TIMER_START{/libs/sling/servlet/default/edit.jsp#0}
3 (2013-09-14 21:36:20) LOG Including resource JcrNodeResource, type=sling:redirect, superType=null, path=/ (SlingRequestPathInfo: path='/', selectorString='head', extension='html', suffix='null')
3 (2013-09-14 21:36:20) TIMER_START{resolveServlet(JcrNodeResource, type=sling:redirect, superType=null, path=/)}
3 (2013-09-14 21:36:20) TIMER_END{0,resolveServlet(JcrNodeResource, type=sling:redirect, superType=null, path=/)} Using servlet /libs/sling/servlet/default/head.jsp

关于aem - 跟踪 sling jsp 分辨率和选择器与变量的使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18799650/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com