2

我一直在 JSP 开发站点上配置 XPM(Tridion 2012 UI 更新)。这是一个多合一的软件包,内容管理器、数据库和登台在同一台服务器上用于开发目的。

我做了以下配置:

  • 已定义的 Staging Web App(称为 JSPStaging 并设置为 jspstaging.project.dev 的主机头),它从 HTTPUpload Web App(在 CME 的发布目标中定义)接收内容并将此内容放置在自己的文件夹中

  • 我添加了 Java Session Preview Webservice(称为 cd_preview_webservice)

目前我的站点由 Tomcat 7 运行,IIS 7.5 用于将请求路由到处理 jspstaging.project.dev 的端口 8080 (Tomcat)。

我知道这不是一个理想的情况,但我必须凑合。

手头的问题:我目前已经成功实现了 XPM(或者至少是仪表板,能够编辑和保存这些组件)但是,一旦您想更新页面,它有时会刷新,有时会返回错误:

The remote server returned an error: (404) Not Found.

这是一条(橙色)Tridion 消息。我不完全确定上述 404 错误与SDL Live Content中记录的错误相同。

这是服务器上事件查看器中的错误:

Unable to update the changes using OData Service. The remote server returned an error: (404) Not Found. Component: Tridion.SiteEdit.FastTrackPublishing Errorcode: 1003 User: NT AUTHORITY\NETWORK SERVICE 

因此,我正在关注 Albert Romkes 写的这篇非常棒博文,在他的文章的第 2 点,他提到了导航到 odata.svc。我似乎无法在我的暂存或会话预览 Web 应用程序的任何地方找到该文件。我以前安装过 Tridion 的 .NET 应用程序,而安装媒体上的 .NET 应用程序(以及其他文件)有一个 acces_token 和一个 odata.svc 文件,我注意到会话预览的 web 服务的 JAVA 安装没有有这些文件。但是,在安装指南的后面部分,您需要这些文件来设置发布。

当我按照 JSP 站点部分并填写发布目标的会话预览选项卡上的字段时,我无法导航到服务器本身上的这个 odata url,现在是

http://localhost:8080/cd_preview_webservice/cdws/odata.svc/

Tridion Logging 并没有说有什么问题,用于暂存和会话预览 Web 应用程序以及 Tomcat 日志。他们甚至说 OData 工作得很好,据我所知......

如果我无法导航到上面发布的网址,这是否意味着有问题,或者 404 错误是因为这个?

编辑

我的分期 web.xml:

    <?xml version="1.0" encoding="UTF-8"?>

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> 内容交付 Web 服务

<jsp-config> 
    <taglib>
        <taglib-uri>cd_tags</taglib-uri>
        <taglib-location>/WEB-INF/lib/cd_tags.tld</taglib-location>
    </taglib>
</jsp-config>
<listener>
    <listener-class>
        com.tridion.storage.persistence.session.SessionManagementContextListener
    </listener-class>
</listener>

<!--
OData and linking Web service
-->
<servlet>
    <servlet-name>Content Delivery Web service</servlet-name>
    <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
    <init-param>
        <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>
        <param-value>com.sun.jersey.api.core.ClassNamesResourceConfig</param-value>
    </init-param>
    <init-param>
        <param-name>com.sun.jersey.config.property.classnames</param-name>
        <param-value>com.tridion.webservices.odata.ODataWebservice;com.tridion.webservices.linking.LinkingService;com.tridion.webservices.odata.JAXBContextResolver</param-value>
    </init-param>
</servlet>
    <filter>
    <filter-name>Ambient Data Framework</filter-name>
    <filter-class>com.tridion.ambientdata.web.AmbientDataServletFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>Ambient Data Framework</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

<servlet-mapping>
    <servlet-name>Content Delivery Web service</servlet-name>
    <url-pattern>/cdws/*</url-pattern>
</servlet-mapping>

<filter>
    <filter-name>Page Content Filter</filter-name>
    <filter-class>com.tridion.preview.web.PageContentFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>Page Content Filter</filter-name>
    <url-pattern>/cdws/*</url-pattern>
</filter-mapping>

<listener>
    <listener-class>com.tridion.webservices.odata.ODataContextListener</listener-class>
</listener>
<filter>
    <filter-name>Binary Content Filter</filter-name>
    <filter-class>com.tridion.preview.web.BinaryContentFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>Binary Content Filter</filter-name>
    <url-pattern>/Images/*</url-pattern>
</filter-mapping>
4

1 回答 1

0

You mentioned that you've added the cd_preview_webservice, however, the error message dictates that it's not working. On the Java side, you won't see the odata.svc file as this url is handled by one of the classes within the jars, so don't worry about that.

In your Tomcat console, does it show that the app has been deployed/started without error?

Also the URL that you mention "/cd_preview_webservice/cdws/odata.svc/" has a "/cdws/" in it. This seems a bit irregular. Typically the url is "/cd_preview_webservice/odata.svc". What is does your web.xml look like?

于 2013-02-06T18:33:45.900 回答