Sling 中的默认脚本分辨率
我不知道我的术语是否完全正确,但 Sling 中的脚本解析似乎有一些默认行为(我将其用作 Day CQ 的一部分)。例如,.infinity.json 返回节点及其子节点的表示形式。另外,如果我有一段通常使用 .html 扩展名访问的内容,我就可以使用 .xml 或 .json 扩展名来获取该数据的表示形式。但是,如果我使用 .txt 扩展名,我将得不到任何回报,即使据我所知,我确实有应该与请求匹配的脚本(例如 GET.jsp)。这些行为是否记录在某处?
I don't know that I have the terminology completely correct, but it seems that there are some default behaviors for script resolution in Sling (which I'm using as part of Day CQ). For example, .infinity.json returns a representation of the node and its children. Also, if I have a piece of content that I normally would access with a .html extension, I've been able to use a .xml or .json extension to get a representation of that data. However, if I use a .txt extension, I get nothing back, even though as far as I can tell, I do have scripts that should match the request (eg GET.jsp). Are these behaviors documented somewhere?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
GET.jsp 将匹配以 .html 结尾的请求,因为 Sling 将 html 视为默认表示形式。要激活 JSP 脚本进行 .txt 渲染,您需要将其命名为 txt.jsp
请参阅 http:// /sling.apache.org/site/servlets.html 了解详细信息。
GET.jsp will match a request ending with .html, as Sling considers html as the default representation. To activate a JSP script for the .txt rendering, you need to name it txt.jsp
See http://sling.apache.org/site/servlets.html for details.