0

我正在尝试获取页面(CQ 5.4):http://localhost:4502/etc/replication/agents.author.html

但请看下一个:

Resource dumped by HtmlRendererServlet
Resource path: /etc/replication/agents.author
Resource metadata: {sling.resolutionPathInfo=.html, sling.resolutionPath=/etc/replication/agents.author}
Resource type: cq:Page
Resource super type: -
Resource properties..

在“系统/控制台”>“最近的请求”中,我们可以看到渲染过程。

0 (2013-12-16 02:33:09) TIMER_START{Request Processing}
      0 (2013-12-16 02:33:09) COMMENT timer_end format is {<elapsed msec>,<timer name>} <optional message>
      0 (2013-12-16 02:33:09) LOG Method=GET, PathInfo=/etc/replication/agents.author.html
      0 (2013-12-16 02:33:09) TIMER_START{ResourceResolution}
      1 (2013-12-16 02:33:09) TIMER_END{1,ResourceResolution} URI=/etc/replication/agents.author.html resolves to Resource=JcrNodeResource, type=cq:Page, superType=null, path=/etc/replication/agents.author
      1 (2013-12-16 02:33:09) LOG Resource Path Info: SlingRequestPathInfo: path='/etc/replication/agents.author', selectorString='null', extension='html', suffix='null'
      1 (2013-12-16 02:33:09) TIMER_START{ServletResolution}
      1 (2013-12-16 02:33:09) TIMER_START{resolveServlet(JcrNodeResource, type=cq:Page, superType=null, path=/etc/replication/agents.author)}
      1 (2013-12-16 02:33:09) TIMER_END{0,resolveServlet(JcrNodeResource, type=cq:Page, superType=null, path=/etc/replication/agents.author)} Using servlet org.apache.sling.servlets.get.DefaultGetServlet
      1 (2013-12-16 02:33:09) TIMER_END{0,ServletResolution} URI=/etc/replication/agents.author.html handled by Servlet=org.apache.sling.servlets.get.DefaultGetServlet
      1 (2013-12-16 02:33:09) LOG Applying Requestfilters

使用 DefaultGetServlet 而不是 Page.jsp(使用 servlet org.apache.sling.servlets.get.DefaultGetServlet

所有捆绑包都处于活动状态。

Log outputs:
==> request.log <==
17/Dec/2013:01:29:49 -0800 [3677] -> GET /etc/replication/agents.author.html HTTP/1.1
17/Dec/2013:01:29:49 -0800 [3677] <- 200 text/html 3ms

==> access.log <==
<myIp> - admin 17/Dec/2013:01:29:49 -0800 "GET /etc/replication/agents.author.html HTTP/1.1" 200 1232 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36"

==> request.log <==
17/Dec/2013:01:29:50 -0800 [3678] -> GET /favicon.ico HTTP/1.1

==> error.log <==
17.12.2013 01:29:50.332 *INFO* [82.209.214.162 [1387272590327] GET /favicon.ico HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /favicon.ico not found

==> request.log <==
17/Dec/2013:01:29:50 -0800 [3678] <- 404 text/html 6ms

==> access.log <==
<myip> admin 17/Dec/2013:01:29:50 -0800 "GET /favicon.ico HTTP/1.1" 404 393 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36"

什么破了?为什么会这样?

在捆绑包中,我发现了下一个差异(比较损坏的实例和未损坏的相同实例):

Day CRX Sling - Token Authenticationcom.day.crx.sling.crx-auth-token    2.2.0.54    cq5 Active
Day CRX Sling - Token Authenticationcom.day.crx.sling.crx-auth-token    2.2.0.61    cq5 Active

此外,我的损坏实例上还有一个活动包:Day Communique 5 WCM Geometrixx Gocom.day.cq.wcm.cq-wcm-geometrixx-go 5.4.0 将其关闭,但没有帮助。

之后,我在包管理器中上传了 cq-content-5.4.jar,安装它,重新启动系统。但是对于所有页面,我再次遇到相同的错误(HtmlRendererServlet 转储的资源)。它也没有帮助。

4

2 回答 2

2

它也可能由于 Apache Sling Resource Resolver Factory 设置中的设置而发生。我们遇到了同样的问题,发现资源搜索路径的设置缺少所有条目。验证默认条目应具有以下内容:

/aps
/libs
/apps/foundation/components/primary
/libs/foundation/components/primary
于 2015-08-19T20:12:15.893 回答
1

我意识到这是很久以后的事了,但也许它可能对未来的开发人员有用。

如果您使用默认的 GET servlet,则需要在 Apache Sling Get Servlet 中配置一个设置来呈现 HTML。这可以在 Apache Felix Web 控制台中找到。你可以在这里访问它:

/system/console/configMgr

然后搜索“Sling Get servlet”。在您的配置中,您需要切换“启用 HTML”的配置设置,以选择是否启用默认 Get servlet 的 HTML 渲染器。

于 2019-03-07T13:54:32.353 回答