<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic with LTS2015, how to force Http Response to set Content-Disposition to &amp;quot;inline&amp;quot; for blob documents ?  in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/with-lts2015-how-to-force-http-response-to-set-content/m-p/322774#M9775</link>
    <description>&lt;P&gt;Within a Nuxeo 5.8 webengine site,  I used to force  Http Response to set Content-Disposition to "&lt;STRONG&gt;inline&lt;/STRONG&gt;" for blob documents. I do it this way :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.ResponseBuilder;
...
Blob requestedBlob = (Blob) propertyFile.getValue();
ContentDisposition contentDisposition = ContentDisposition.type("inline").fileName(requestedFilename).creationDate(new Date()).build();;
requestedObject = Response.ok().header("Content-Disposition",contentDisposition).type(requestedBlob.getMimeType()).entity(requestedBlob).build();
return requestedObject;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This code doesn't work with LTS2015 plaform... Content-Disposition is always set to "&lt;STRONG&gt;attachment&lt;/STRONG&gt;; filename=..."
I saw that the artifact** javax.ws.rs:jsr311-api** used with Nuxeo 5.8 has been replaced by &lt;STRONG&gt;com.sun.jersey:jersey-server&lt;/STRONG&gt; in LTS2015.&lt;/P&gt;
&lt;P&gt;Here is my pom.xml:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;	&amp;lt;parent&amp;gt;
		&amp;lt;groupId&amp;gt;org.nuxeo&amp;lt;/groupId&amp;gt;
		&amp;lt;artifactId&amp;gt;nuxeo-addons-parent&amp;lt;/artifactId&amp;gt;
		&amp;lt;version&amp;gt;7.10&amp;lt;/version&amp;gt;
	&amp;lt;/parent&amp;gt;
....
	&amp;lt;dependencies&amp;gt;
		&amp;lt;dependency&amp;gt;
			&amp;lt;groupId&amp;gt;com.sun.jersey&amp;lt;/groupId&amp;gt;
			&amp;lt;artifactId&amp;gt;jersey-server&amp;lt;/artifactId&amp;gt;
		&amp;lt;/dependency&amp;gt;
		&amp;lt;dependency&amp;gt;
			&amp;lt;groupId&amp;gt;org.nuxeo.ecm.core&amp;lt;/groupId&amp;gt;
			&amp;lt;artifactId&amp;gt;nuxeo-core-api&amp;lt;/artifactId&amp;gt;
		&amp;lt;/dependency&amp;gt;
		&amp;lt;dependency&amp;gt;
			&amp;lt;groupId&amp;gt;org.nuxeo.ecm.platform&amp;lt;/groupId&amp;gt;
			&amp;lt;artifactId&amp;gt;nuxeo-platform-relations-api&amp;lt;/artifactId&amp;gt;
		&amp;lt;/dependency&amp;gt;
		&amp;lt;dependency&amp;gt;
			&amp;lt;groupId&amp;gt;org.nuxeo.ecm.webengine&amp;lt;/groupId&amp;gt;
			&amp;lt;artifactId&amp;gt;nuxeo-webengine-core&amp;lt;/artifactId&amp;gt;
		&amp;lt;/dependency&amp;gt;
		&amp;lt;dependency&amp;gt;
			&amp;lt;groupId&amp;gt;org.nuxeo.ecm.webengine&amp;lt;/groupId&amp;gt;
			&amp;lt;artifactId&amp;gt;nuxeo-webengine-base&amp;lt;/artifactId&amp;gt;
		&amp;lt;/dependency&amp;gt;
		&amp;lt;dependency&amp;gt;
			&amp;lt;groupId&amp;gt;org.nuxeo.ecm.platform&amp;lt;/groupId&amp;gt;
			&amp;lt;artifactId&amp;gt;nuxeo-platform-preview&amp;lt;/artifactId&amp;gt;
		&amp;lt;/dependency&amp;gt;
		&amp;lt;dependency&amp;gt;
			&amp;lt;groupId&amp;gt;org.nuxeo.ecm.core&amp;lt;/groupId&amp;gt;
			&amp;lt;artifactId&amp;gt;nuxeo-core-mimetype&amp;lt;/artifactId&amp;gt;
		&amp;lt;/dependency&amp;gt;
		&amp;lt;dependency&amp;gt;
			&amp;lt;groupId&amp;gt;javax.servlet&amp;lt;/groupId&amp;gt;
			&amp;lt;artifactId&amp;gt;javax.servlet-api&amp;lt;/artifactId&amp;gt;
		&amp;lt;/dependency&amp;gt;
	&amp;lt;/dependencies&amp;gt;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Did I miss something?&lt;/P&gt;
&lt;P&gt;Regards,
Henri&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2017 13:29:27 GMT</pubDate>
    <dc:creator>Henri_Jacob</dc:creator>
    <dc:date>2017-02-28T13:29:27Z</dc:date>
    <item>
      <title>with LTS2015, how to force Http Response to set Content-Disposition to "inline" for blob documents ?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/with-lts2015-how-to-force-http-response-to-set-content/m-p/322774#M9775</link>
      <description>&lt;P&gt;Within a Nuxeo 5.8 webengine site,  I used to force  Http Response to set Content-Disposition to "&lt;STRONG&gt;inline&lt;/STRONG&gt;" for blob documents. I do it this way :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.ResponseBuilder;
...
Blob requestedBlob = (Blob) propertyFile.getValue();
ContentDisposition contentDisposition = ContentDisposition.type("inline").fileName(requestedFilename).creationDate(new Date()).build();;
requestedObject = Response.ok().header("Content-Disposition",contentDisposition).type(requestedBlob.getMimeType()).entity(requestedBlob).build();
return requestedObject;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This code doesn't work with LTS2015 plaform... Content-Disposition is always set to "&lt;STRONG&gt;attachment&lt;/STRONG&gt;; filename=..."
I saw that the artifact** javax.ws.rs:jsr311-api** used with Nuxeo 5.8 has been replaced by &lt;STRONG&gt;com.sun.jersey:jersey-server&lt;/STRONG&gt; in LTS2015.&lt;/P&gt;
&lt;P&gt;Here is my pom.xml:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;	&amp;lt;parent&amp;gt;
		&amp;lt;groupId&amp;gt;org.nuxeo&amp;lt;/groupId&amp;gt;
		&amp;lt;artifactId&amp;gt;nuxeo-addons-parent&amp;lt;/artifactId&amp;gt;
		&amp;lt;version&amp;gt;7.10&amp;lt;/version&amp;gt;
	&amp;lt;/parent&amp;gt;
....
	&amp;lt;dependencies&amp;gt;
		&amp;lt;dependency&amp;gt;
			&amp;lt;groupId&amp;gt;com.sun.jersey&amp;lt;/groupId&amp;gt;
			&amp;lt;artifactId&amp;gt;jersey-server&amp;lt;/artifactId&amp;gt;
		&amp;lt;/dependency&amp;gt;
		&amp;lt;dependency&amp;gt;
			&amp;lt;groupId&amp;gt;org.nuxeo.ecm.core&amp;lt;/groupId&amp;gt;
			&amp;lt;artifactId&amp;gt;nuxeo-core-api&amp;lt;/artifactId&amp;gt;
		&amp;lt;/dependency&amp;gt;
		&amp;lt;dependency&amp;gt;
			&amp;lt;groupId&amp;gt;org.nuxeo.ecm.platform&amp;lt;/groupId&amp;gt;
			&amp;lt;artifactId&amp;gt;nuxeo-platform-relations-api&amp;lt;/artifactId&amp;gt;
		&amp;lt;/dependency&amp;gt;
		&amp;lt;dependency&amp;gt;
			&amp;lt;groupId&amp;gt;org.nuxeo.ecm.webengine&amp;lt;/groupId&amp;gt;
			&amp;lt;artifactId&amp;gt;nuxeo-webengine-core&amp;lt;/artifactId&amp;gt;
		&amp;lt;/dependency&amp;gt;
		&amp;lt;dependency&amp;gt;
			&amp;lt;groupId&amp;gt;org.nuxeo.ecm.webengine&amp;lt;/groupId&amp;gt;
			&amp;lt;artifactId&amp;gt;nuxeo-webengine-base&amp;lt;/artifactId&amp;gt;
		&amp;lt;/dependency&amp;gt;
		&amp;lt;dependency&amp;gt;
			&amp;lt;groupId&amp;gt;org.nuxeo.ecm.platform&amp;lt;/groupId&amp;gt;
			&amp;lt;artifactId&amp;gt;nuxeo-platform-preview&amp;lt;/artifactId&amp;gt;
		&amp;lt;/dependency&amp;gt;
		&amp;lt;dependency&amp;gt;
			&amp;lt;groupId&amp;gt;org.nuxeo.ecm.core&amp;lt;/groupId&amp;gt;
			&amp;lt;artifactId&amp;gt;nuxeo-core-mimetype&amp;lt;/artifactId&amp;gt;
		&amp;lt;/dependency&amp;gt;
		&amp;lt;dependency&amp;gt;
			&amp;lt;groupId&amp;gt;javax.servlet&amp;lt;/groupId&amp;gt;
			&amp;lt;artifactId&amp;gt;javax.servlet-api&amp;lt;/artifactId&amp;gt;
		&amp;lt;/dependency&amp;gt;
	&amp;lt;/dependencies&amp;gt;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Did I miss something?&lt;/P&gt;
&lt;P&gt;Regards,
Henri&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 13:29:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/with-lts2015-how-to-force-http-response-to-set-content/m-p/322774#M9775</guid>
      <dc:creator>Henri_Jacob</dc:creator>
      <dc:date>2017-02-28T13:29:27Z</dc:date>
    </item>
  </channel>
</rss>

