Issue

When you serialize your pages as XML using XMLUtil class from Day API like Document document = XMLUtil.createXMLDocument(ticket, handle), you receive the following error:

19 Feb 2008 14:42:42,608 DEBUG com.apps.cq.servlets.XmlWriterServlet:71 -requested page cannot provide a default input source:

Solution

See the class com.day.cq.transform.PageToXML. For example:

File xmlFile = new File("/tmp/page.xml"); PageToXML p2xml = new PageToXML(); p2xml.setBinaryAsLink(true); p2xml.apply(cqReq.getTicket().getPage("/content/designground/en/company"), xmlFile);

本产品经 Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License 许可  Twitter™ 与 Facebook 中的内容不在 Creative Commons 的条款约束之下。

法律声明   |   在线隐私策略