My Oracle Support Banner

Portlet renderResponse.setContentType(''application/pdf'') gives error for WSRP portlets (Doc ID 402015.1)

Last updated on APRIL 08, 2025

Applies to:

Portal - Version 9.0.4 to 11.1.1.7.0 [Release 10g to FMW11g]
Information in this document applies to any platform.

Goal

Is it possible to render PDF content within a WSRP portlet, as using the following API gives an error:

renderResponse.setContentType("application/pdf");


Error:

oracle.webdb.utils.PortalExceptionImpl: Content type "application/pdf" is not allowed in current context
at
oracle.webdb.wsrp.server.ContainerIllegalArgumentException.<init>(Unknown Source)
at
oracle.webdb.wsrp.server.ContainerIllegalArgumentException.<init>(Unknown Source)

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.