cancel
Showing results for 
Search instead for 
Did you mean: 

Response from Abstract Portal Component

Former Member
0 Kudos

I am planning to write a Abstract Portal Component to respond with plain html which should not be wrapped with portal html.

example:

  I am having a code in one AbstratcPortal Component as

     response.write("<head><body> test</body></head>");

I do see that Response as

<html><head><LINK REL=stylesheet href="https://answers.sap.com/irj/portalapps/com.sap.portal.design.portaldesigndata/themes/portal/sap_tradeshow/prtl_std/prtl_std_nn7.css?7.1.3.0.0"><!-- HTML Business for Java, 701_SP_REL, 507411, Wed Nov 05 20:19:36 EST 2008 --><!-- HTMLB: begin VARS --><script language="JavaScript">ur_system = {doc : window.document , mimepath :"/irj/portalapps/com.sap.portal.design.urdesigndata/themes/portal/sap_tradeshow/common/", stylepath : "/irj/portalapps/com.sap.portal.design.urdesigndata/themes/portal/sap_tradeshow/ur/", emptyhoverurl : "/irj/portalapps/com.sap.portal.htmlb/jslib/emptyhover.html", is508 : false, dateformat : 1, domainrelaxing : "MINIMAL"};</script><!-- HTMLB: end   VARS --><title >SAP NetWeaver Portal</title><meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"></head><body class="prtlBody urFontBaseFam urScrl"><head><body> test</body></head></body></html>

In the above example is there any way to get the response as  "<head><body> test</body></head>"

Accepted Solutions (0)

Answers (1)

Answers (1)

hofmann
Active Contributor
0 Kudos

You have to notify the portal that you want to have full control over the output:

public void doContent(IPortalComponentRequest request, IPortalComponentResponse response) {  

  PrintWriter out;   

  HttpServletResponse servletResponse = request.getServletResponse(true);

  out.write("Yay!");