Need DPM page to respond with RSS+XML MIME type
HI,
I am using a DPM build (VCM 8.0 / VAP 8.1) on Tomcat. I've created an RSS feed with a grid and content-publisher portlet.
But the portal always responds with "text/html" instead of "application/rss+xml" in the HTTP header. Below is part of an example response header:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=9783227D8AB1BFB04C0A0507E7BDD92E; Path=/sitename
Set-Cookie: VignettePortal-NavTreeState-sitename=""; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
Cache-Control: no-cache
Content-Type: text/html;charset=UTF-8
Transfer-Encoding: chunked
Date: Mon, 11 Jul 2011 14:24:30 GMT
I tried putting these JSP lines in both grid and portlet, but portal still insists on "text/html":
<%@ page contentType="application/rss+xml" pageEncoding="UTF-8" %>
<% response.setContentType("application/rss+xml;charset=UTF-8"); %>
Also tried adding the MIME type to the portal web.xml file as below and create an "rss" presentation format just to get the ".rss" extension in the URL, but it didn't help either.
<mime-mapping>
<extension>rss</extension>
<mime-type>application/rss+xml</mime-type>
</mime-mapping>
Anybody know of a way to force the portal to respond with a MIME type other than "text/html" on a DPM template?
Comments
-
Hello Jeffrey,
I do not believe the Content-Type header can be set or overriden through Portal product configuration or API.
That said, one solution would be to override the header using a custom servlet filter. OpenText KB article 17551988 describes the rough steps for overriding response headers using a custom filter. Article 17538266 outlines the support ramifications of adding custom servlet filters to Portal.
There are many examples online. Remeber to add logic to the filter so that it only applies to responses for the page you are concearned with.
Kind Regards
Alex0 -
Did you get this to work? I am facing same issue and would be glad if you can help me a bit.....
Thanks
-Naresh
0 -
Do you have any solutions in 2022? This is definitely not the server's fault.
0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 149 General Questions
- 148 Thrust Services
- 56 OpenText Hackathon
- 35 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 181 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories