Setting Reponse Header in a portlet?

I want to set the 'Content-Disposition' response-header field
as 'attachment;"myfile.csv"'. So that user will be able to
download the cotent as a .csv file.
But the setHeader() of the response object doesn't seem to work
in the portlet.
How do I set the response header in a portlet?
Thanks
Sagar

The subsequent servlets and filters will get the same request that the first filter has. The passing to the next servlet is via a method call.

Similar Messages

  • ProtocolException: Bad Set-Cookie header

    I am getting the below error after sending the request xml in weblogic portal 10.3,
    Request XML is inside <soapenv> tags and I am not pasting the request xml, but directly the error I am getting after that....
    headerData = {SOAPAction="",SOAPMethodName=PostMessage,Content-Type=text/xml;charset=utf-8}
    12/06 19:26:18 DEBUG n.common.gateway.HttpSubmitter - Proxy not used.
    12/06 19:26:20 ERROR n.common.gateway.HttpSubmitter - Exception caught #1: exception:
    java.net.ProtocolException: Bad Set-Cookie header: NSC_ttqvbutbd_tqmbu_mcw=ffffffff728afa3445525d5f4f58455e445a4a42156b;path=/;httponly
    No '=' found for token starting at position 76
    at HTTPClient.Cookie.parse(Cookie.java:243)
    at HTTPClient.CookieModule.handleCookie(CookieModule.java:454)
    at HTTPClient.CookieModule.responsePhase1Handler(CookieModule.java:403)
    at HTTPClient.HTTPResponse.handleResponse(HTTPResponse.java:724)
    at HTTPClient.HTTPResponse.getReasonLine(HTTPResponse.java:202)
    at net.verizon.common.gateway.HttpSubmitter.sendRequest(HttpSubmitter.java:281)
    at net.verizon.common.gateway.HttpSubmitter.send(HttpSubmitter.java:89)
    at net.verizon.common.gateway.ssp.request.SearchByMonRequest.send(SearchByMonRequest.java:30)
    at net.verizon.portal.helper.OrderStatusHelper.getAccountDetailsFromSSPForMON(OrderStatusHelper.java:976)
    at net.verizon.portlet.bean.OrderStatusLoginBean.submit(OrderStatusLoginBean.java:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
    at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:95)
    at javax.faces.component.UICommand.broadcast(UICommand.java:383)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:448)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
    at com.bea.portlet.adapter.faces.FacesContentStubImpl.processAction(FacesContentStubImpl.java:246)
    at com.bea.netuix.servlets.controls.content.FacesContent.raiseFacesAction(FacesContent.java:257)
    at com.bea.netuix.servlets.controls.content.FacesContent.handlePostbackData(FacesContent.java:195)
    at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:180)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:324)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
    at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184)
    at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159)
    at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388)
    at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258)
    at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:199)
    at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251)
    at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:686)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogicx.servlet.gzip.filter.GZIPFilter.doFilter(GZIPFilter.java:70)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at net.verizon.webapp.RequestFilter.doFilter(RequestFilter.java:172)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.bea.portal.tools.servlet.http.HttpContextFilter.doFilter(HttpContextFilter.java:60)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:336)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.bea.jsptools.servlet.PagedResultServiceFilter.doFilter(PagedResultServiceFilter.java:82)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3502)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2186)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2092)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    And then Request #2
    12/06 19:26:20 INFO n.common.gateway.HttpSubmitter - Sending Request #2: (POST):
    Again same request XML sent... And then the error coming now is...
    headerData = {SOAPAction="",SOAPMethodName=PostMessage,Content-Type=text/xml;charset=utf-8}
    12/06 19:26:20 DEBUG n.common.gateway.HttpSubmitter - Proxy not used.
    12/06 19:26:38 ERROR n.common.gateway.HttpSubmitter - Exception caught #2: exception
    java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:168)
    .....etc.....
    Please help !

    I am getting the below error after sending the request xml in weblogic portal 10.3,
    Request XML is inside <soapenv> tags and I am not pasting the request xml, but directly the error I am getting after that....
    headerData = {SOAPAction="",SOAPMethodName=PostMessage,Content-Type=text/xml;charset=utf-8}
    12/06 19:26:18 DEBUG n.common.gateway.HttpSubmitter - Proxy not used.
    12/06 19:26:20 ERROR n.common.gateway.HttpSubmitter - Exception caught #1: exception:
    java.net.ProtocolException: Bad Set-Cookie header: NSC_ttqvbutbd_tqmbu_mcw=ffffffff728afa3445525d5f4f58455e445a4a42156b;path=/;httponly
    No '=' found for token starting at position 76
    at HTTPClient.Cookie.parse(Cookie.java:243)
    at HTTPClient.CookieModule.handleCookie(CookieModule.java:454)
    at HTTPClient.CookieModule.responsePhase1Handler(CookieModule.java:403)
    at HTTPClient.HTTPResponse.handleResponse(HTTPResponse.java:724)
    at HTTPClient.HTTPResponse.getReasonLine(HTTPResponse.java:202)
    at net.verizon.common.gateway.HttpSubmitter.sendRequest(HttpSubmitter.java:281)
    at net.verizon.common.gateway.HttpSubmitter.send(HttpSubmitter.java:89)
    at net.verizon.common.gateway.ssp.request.SearchByMonRequest.send(SearchByMonRequest.java:30)
    at net.verizon.portal.helper.OrderStatusHelper.getAccountDetailsFromSSPForMON(OrderStatusHelper.java:976)
    at net.verizon.portlet.bean.OrderStatusLoginBean.submit(OrderStatusLoginBean.java:177)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
    at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
    at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:95)
    at javax.faces.component.UICommand.broadcast(UICommand.java:383)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:448)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
    at com.bea.portlet.adapter.faces.FacesContentStubImpl.processAction(FacesContentStubImpl.java:246)
    at com.bea.netuix.servlets.controls.content.FacesContent.raiseFacesAction(FacesContent.java:257)
    at com.bea.netuix.servlets.controls.content.FacesContent.handlePostbackData(FacesContent.java:195)
    at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:180)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:324)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
    at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184)
    at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159)
    at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388)
    at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258)
    at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:199)
    at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251)
    at com.bea.netuix.servlets.manager.PortalServlet.service(PortalServlet.java:686)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogicx.servlet.gzip.filter.GZIPFilter.doFilter(GZIPFilter.java:70)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at net.verizon.webapp.RequestFilter.doFilter(RequestFilter.java:172)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.bea.portal.tools.servlet.http.HttpContextFilter.doFilter(HttpContextFilter.java:60)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:336)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at com.bea.jsptools.servlet.PagedResultServiceFilter.doFilter(PagedResultServiceFilter.java:82)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3502)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2186)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2092)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    And then Request #2
    12/06 19:26:20 INFO n.common.gateway.HttpSubmitter - Sending Request #2: (POST):
    Again same request XML sent... And then the error coming now is...
    headerData = {SOAPAction="",SOAPMethodName=PostMessage,Content-Type=text/xml;charset=utf-8}
    12/06 19:26:20 DEBUG n.common.gateway.HttpSubmitter - Proxy not used.
    12/06 19:26:38 ERROR n.common.gateway.HttpSubmitter - Exception caught #2: exception
    java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:168)
    .....etc.....
    Please help !

  • Payables Open Interface Import pass distribution set for header?

    Hi all,
    i'm using OEBS 12.1.3. I want to insert data into payables interface tables to create invoice via back-end. Is it possible to pass data for the DISTRIBUTION SET on header level? I searched in the table AP_INVOICES_INTERFACE but no such column founded. I'm able to pass info for the distribution on the line level...
    Any ideas?
    Thanks in advance,
    Bahchevanov.

    The before report trigger error does occur for n number of reasons...some of the solutions could be
    1. Setting up the debug/summarized params to Y or
    2. Two payables open interface import programs running at the same time and due to non-incompatibility setups, one of them is getting errored out. Try setting up incompatibility and this error will go away - the only problem with this approach is that if this program needs to run on frequent basis, then one will wait on other to complete and consume lot of time.
    3. Try to increase threads of concurrent manager under which this program runs for better resouce management.
    4. Check the normal AP side setups such as tax code definition, supplier site 'pay site flag' etc --Although before report error occurs at the place in rdf where these checks are yet not done but thought to share with you if it helps
    Thanks
    Girish

  • How to set the header variables in weblogic

    Hi,
    We have a following set up in our environment.
    We have weblogic and on the top of it we have apex listener deployed which redirects Oracle Apex.
    My Issue:
    How can we set up the header variables in weblogic once the user is authenticated against weblogic server.
    We are struck here, not knowing how to set the header variables in weblogic server. Its fairly straight forward for Oracle Access Manager or others..
    Thanks
    Ramesh P.

    maybe you are looking for the routing options
    http://docs.oracle.com/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html#wp1125348

  • Setting the header of a Column group in a Advanced table dynamically

    Hi All,
    There is a requirement to set the Header of a column group in a Advanced table dynamically by fetching the values from a view attribute.
    Code :
    OAAdvancedTableBean spiderTbl1 ;
    Problem:
    It is not able to set the value for the header inspite of getting the handle of the bean.
    Analysis:
    the same piece of code works for
    1) Setting the text of the advanced table
    2) Setting the header of a column in a column group
    Please let me know if there is anything more that needs to be done for setting the prompt of a column group header.
    Thanks in advance!

    I have posted it without giving the complete code by mistake. Below is the code:
    OAAdvancedTableBean spiderTbl1 ;
    OASortableHeaderBean spiderHdr1;
    spiderTbl1 = (OAAdvancedTableBean)webBean.findChildRecursive("SpiderCatTbl1RN");
    if (spiderTbl1!=null){
    spiderHdr1= (OASortableHeaderBean)spiderTbl1.findChildRecursive("AnalogHdr");
    if (spiderHdr1!=null) {
    spiderHdr1.setAttributeValue(OAWebBeanConstants.PROMPT_ATTR,
    new OADataBoundValueViewObject(spiderHdr1,
    "SpiderCategory1",
    "ProjRegPVO1"));
    }

  • JMS Adapter setting the header data of MQ message

    Hi All,
    I need to set the properties in JMS adapter for setting the header data of MQ message.
    JMS_IBM_MQMD_Format = MQFMT_NONE.
    Thanks in advance
    Ravijeet

    Hi All,
    I am stuck in a typical XI issue.......I have a scenario where my input to XI is IDoc and output is xml message going to IBM MQ.
    The IDoc is sending some chineese character which is fine is SXMB_MONI Integration server and also fine in the payload of message monitoring, so feel the message is going fine from XI to MQ.
    But the receiver EDI system which is picking the message from MQ queue says the chinese characters are getting corrupted. They say that you need to set the additional properties in MQ header data
    JMS_IBM_MQMD_Format = MQFMT_NONE.
    How do I do this in communication channel for jms adapter ? How to I set the MQ header data in jms communication channel ?
    Thanks in advance
    Ravijeet
    Edited by: RAVIJEET DAS on May 12, 2009 8:27 AM
    Edited by: RAVIJEET DAS on May 12, 2009 8:27 AM

  • How to set the header for second page

    Hello all,
    I'm trying to set different header for first page and page number should starts from second page.
    Below is the sample code to set the header for each and every page.
    DECLARE
    hApplication OLE2.OBJ_TYPE;
    hWindow OLE2.OBJ_TYPE;
    hPane OLE2.OBJ_TYPE;
    hView OLE2.OBJ_TYPE;
    hDocuments OLE2.OBJ_TYPE;
    hDocument OLE2.OBJ_TYPE;
    hSelection OLE2.OBJ_TYPE;
    hParagraphFormat OLE2.OBJ_TYPE;
    hRange OLE2.OBJ_TYPE;
    hFields OLE2.OBJ_TYPE;
    hFont OLE2.OBJ_TYPE;
    args OLE2.LIST_TYPE;
    wdAlignParagraphLeft CONSTANT number(3) := 0;
    wdAlignParagraphCenter CONSTANT number(3) := 1;
    wdAlignParagraphRight CONSTANT number(3) := 2;
    wdSeekCurrentPageHeader CONSTANT number(3) := 9;
    wdSeekCurrentPageFooter CONSTANT number(3) := 10;
    wdSeekMainDocument CONSTANT number(3) := 0;
    wdFieldPage CONSTANT number(3) := 33;
    wdFieldNumPages CONSTANT number(3) := 26;
    wdPageBreak CONSTANT number(3) := 7;
    wdStory CONSTANT number(3) := 6;
    myTab CONSTANT varchar2(1) := chr(9);
    myBlue CONSTANT number(8) := 16711680; --FF0000
    myGreen CONSTANT number(8) := 65280; --00FF00
    myRed CONSTANT number(8) := 255; --0000FF
    myDkGreen CONSTANT number(8) := 32768; --008000
    myBlack CONSTANT number(8) := 0; --000000
    myText varchar2(2000);
    BEGIN
    hApplication:=OLE2.CREATE_OBJ('Word.Application');
    OLE2.SET_PROPERTY(hApplication, 'Visible', 1);
    hDocuments := OLE2.GET_OBJ_PROPERTY(hApplication, 'Documents');
    hDocument := OLE2.INVOKE_OBJ(hDocuments, 'Add');
    -------- Create Header and Footer --------
    hWindow := OLE2.GET_OBJ_PROPERTY(hApplication, 'ActiveWindow');
    hPane := OLE2.GET_OBJ_PROPERTY(hWindow, 'ActivePane' );
    hView := OLE2.GET_OBJ_PROPERTY(hPane, 'View' );
    ---- Header Section ---
    OLE2.SET_PROPERTY(hView, 'SeekView', wdSeekCurrentPageHeader);
    hSelection := OLE2.GET_OBJ_PROPERTY(hApplication, 'Selection');
    hFont := OLE2.GET_OBJ_PROPERTY(hSelection, 'Font');
    OLE2.SET_PROPERTY(hFont, 'Name', 'Times New Roman');
    OLE2.SET_PROPERTY(hFont, 'Size', 10);
    OLE2.SET_PROPERTY(hFont, 'Bold', FALSE);
    OLE2.SET_PROPERTY(hFont, 'Color', MyBlue );
    hParagraphFormat := OLE2.GET_OBJ_PROPERTY(hSelection, 'ParagraphFormat');
    OLE2.SET_PROPERTY(hParagraphFormat, 'Alignment', wdAlignParagraphCenter);
    OLE2.RELEASE_OBJ(hParagraphFormat);
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'This is a');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.INVOKE(hSelection, 'TypeParagraph');
    OLE2.SET_PROPERTY(hFont, 'Size', 16);
    OLE2.SET_PROPERTY(hFont, 'Bold', TRUE);
    OLE2.SET_PROPERTY(hFont, 'Color', MyDkGreen );
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'Test Header');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    ---- Footer Section ----
    OLE2.SET_PROPERTY(hView, 'SeekView', wdSeekCurrentPageFooter);
    hParagraphFormat := OLE2.GET_OBJ_PROPERTY(hSelection, 'ParagraphFormat');
    OLE2.SET_PROPERTY(hParagraphFormat, 'Alignment', wdAlignParagraphCenter);
    OLE2.RELEASE_OBJ(hParagraphFormat);
    hFields := OLE2.GET_OBJ_PROPERTY(hSelection, 'Fields');
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'Page ');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    hRange := OLE2.GET_OBJ_PROPERTY(hSelection, 'Range');
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG_OBJ(args, hRange);
    OLE2.ADD_ARG(args, wdFieldPage);
    OLE2.INVOKE(hFields, 'Add', args );
    OLE2.DESTROY_ARGLIST(args);
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, ' of ');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    hRange := OLE2.GET_OBJ_PROPERTY(hSelection, 'Range');
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG_OBJ(args, hRange);
    OLE2.ADD_ARG(args, wdFieldNumPages);
    OLE2.INVOKE(hFields, 'Add', args );
    OLE2.DESTROY_ARGLIST(args);
    OLE2.RELEASE_OBJ(hRange);
    OLE2.RELEASE_OBJ(hFields);
    OLE2.SET_PROPERTY(hView, 'SeekView', wdSeekMainDocument);
    OLE2.RELEASE_OBJ(hView);
    OLE2.RELEASE_OBJ(hPane);
    OLE2.RELEASE_OBJ(hWindow);
    -------- Insert Text --------
    hFont := OLE2.GET_OBJ_PROPERTY(hSelection, 'Font');
    OLE2.SET_PROPERTY(hFont, 'Name', 'Arial');
    OLE2.SET_PROPERTY(hFont, 'Size', 12);
    OLE2.SET_PROPERTY(hFont, 'Bold', FALSE );
    OLE2.SET_PROPERTY(hFont, 'Color', myBlack );
    OLE2.INVOKE(hSelection, 'TypeParagraph');
    myText := myTab || 'This text is on the ';
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, myText);
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.SET_PROPERTY(hFont, 'Bold', TRUE);
    OLE2.SET_PROPERTY(hFont, 'Color', myRed);
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'first ');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.SET_PROPERTY(hFont, 'Bold', FALSE);
    OLE2.SET_PROPERTY(hFont, 'Color', myBlack );
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'page.');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, wdPageBreak);
    OLE2.INVOKE(hSelection, 'InsertBreak', args);
    OLE2.DESTROY_ARGLIST(args);
    ----page 2
    myText := myTab || 'This text is on the ';
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, myText );
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.SET_PROPERTY(hFont, 'Bold', TRUE);
    OLE2.SET_PROPERTY(hFont, 'Color', myBlue);
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'second ');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.SET_PROPERTY(hFont, 'Bold', FALSE);
    OLE2.SET_PROPERTY(hFont, 'Color', myBlack );
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, 'page.');
    OLE2.INVOKE(hSelection, 'TypeText', args);
    OLE2.DESTROY_ARGLIST(args);
    ---- go to the top of the first page
    args := OLE2.CREATE_ARGLIST;
    OLE2.ADD_ARG(args, wdStory);
    OLE2.INVOKE(hSelection, 'HomeKey', args);
    OLE2.DESTROY_ARGLIST(args);
    OLE2.RELEASE_OBJ(hFont);
    OLE2.RELEASE_OBJ(hSelection);
    OLE2.RELEASE_OBJ(hDocument);
    OLE2.RELEASE_OBJ(hDocuments);
    OLE2.RELEASE_OBJ(hApplication);
    END;
    Please help me out
    Thanks,
    Bhavana

    Click on --
    Edit link for Page> Click "Edit Default" link on Banner >
    Under the "Banner Links"
    provide value something like this:
    Label = Help
    URL = /pls/portal30/docs/myhelp.html
    Icon = U can upload any icon here.
    For Application Components = See the Second Last tab on "Edit Component".
    Thanx,
    Chetan.

  • How to set the header of the file to excel type when writing it?

    Hello,
    I am using POI API to read an excel file that I have previously written using Java, but not using POI (I've written the file using Microsoft office xml and then writing it using FileOutputStream with an xls extension).
    The problem is that when I read back the file I am getting this error:
    The system was unable to upload the file: Invalid header signature; read 7311066695147732796, expected -2226271756974174256.
    which means that the header of the file is not excel typed.
    If I manually open the file and save it as excel POI is able to read it but I don't want to do this as this entire process of writing/reading the file should be automated. I don't want to use POI for writing the file because POI cannot provide me everything that I need when Microsoft office xml can.
    So, my question is simple: Is there a way, using java, to set the header of a file to excel so that POI will recognize it as such?

    hi roy,
    @see: http://poi.apache.org/hssf/index.html
    "HSSF is the POI Project's pure Java implementation of the Excel '97(-2007) file format. It does not support the new Excel 2007 .xlsx OOXML file format, which is not OLE2 based."
    maybe jexcelapi supports you in writing your xls:
    http://jexcelapi.sourceforge.net/
    hth, jens

  • Setting soap header in BPM

    Hi All,
    We are invoking a external webservice using BPM composite, where the webservice is expecting a soap header , could some one help us in setting message header .. is there any way of setting message header using service task or mediator ..
    Regards,
    Passi

    Hi All,
    We are invoking a external webservice using BPM composite, where the webservice is expecting a soap header , could some one help us in setting message header .. is there any way of setting message header using service task or mediator ..
    Regards,
    Passi

  • Is there a way to pair more then one set wireless head phones to either a iphone or ipad with the blue tooth?

    Is there a way to pair more then one set wireless head phones to either a iphone or ipad with the blue tooth?

    Yes. I have two different Bluetooth headsets and they are both paired to my iPhone so I can use either one but only one can be used at any one time.
    To pair the second one, simply repeat the pairing process that you used for the first one.

  • How to set different header for different Standard report page

    How to set different header for different Standard report page

    Hi,
    A easy answer would be use the 'set report header text.vi' but maybe you are talking about something else ?

  • How to display the image while set custom header "x-content-type-options" as "nosniff" in web.config

    Hi,
    I am using Microsoft ASP.NET TreeView control where I have bound embedded images. Also I have set custom header “x-content-type-options” as
    “nosniff” in web.config file.
    On hosting the sample containing the above mentioned things in SERVER machine, the images are not visible but its working properly while running sample in local (development) machine. 
    Kindly provide a solution and find the sample in the below link.
    http://goo.gl/6uR2b0 
    Thanks,
    Alagarsamy D.

    Hi AlagarBala,
    Your issue is related to asp.net/web technology and for a better support on this please post your question to the asp.net forum below, this forum is for C# code issues in speicific:
    http://forums.asp.net/
    Regards,
    Fouad Roumieh

  • Unable to set the header - Message-Id in MimeMessage

    Hi all,
    I'm facing problem in setting the header -> Message-Id
    for my MimeMessage.I tried setting the header using
    MimeMessage.setHeader() , also I tried with
    MimeMessage.addHeader() both the methods didn't
    work.
    I've also excuted the MimeMessage.saveChanges()
    after setting the header.
    I tried to display the message after using the above
    with getHeader("Message-Id").
    But it seems like the values I have set are not being
    reflected.
    Can anyone suggest why this is happening?
    Any help will be great!!!
    dannyy

    Hi,
    I'm getting the header after I do MimeMessage.saveChanges(); and before sending the mail.
    I want to change the message-id that was generated as
    you have mention below. Since I'm trying to automate
    a part of my mail. I'm sending a request to a mail robot
    which need the user name in specfic format
    ex: [email protected] But its attaching my
    local machine name at the end like : dannyy.fischer@localhost. Is there a way to change this part in the message id.
    Please let me know.
    thanks
    dannyy

  • Set  SOAP header element while invoking WS thru ADF webservice Data control

    Experts,
    I am trying to invoke/call a webservice (using ADF web service data control ) which is expecting custom element in SOAP-Header. I want to know the steps needed to set SOAP-Header custom element when using ADF web service data control. SOAP-Header custom element will be string type, something like
    <soap:Header><element1>String</element1></soap:Header>
    Thank you,
    Ashish

    Hi,
    extend the SOAPProvider class
    import javax.xml.soap.SOAPEnvelope;
    import javax.xml.soap.SOAPException;
    import javax.xml.soap.SOAPMessage;
    import oracle.adf.model.adapter.AdapterException;
    import oracle.adfinternal.model.adapter.webservice.provider.soap.SOAPProvider;
    public class CustomSOAProvider extends SOAPProvider {
        public CustomSOAProvider() {
            super();
        //expose protected method to public
        public void handleRequest(SOAPMessage soapMessage) throws AdapterException {
            super.handleRequest(soapMessage);
        //Expose protetcted method to public
        public void handleResponse(SOAPMessage soapMessage) throws AdapterException {
            super.handleResponse(soapMessage);
        }And configure it in the DataControls.dcx file of your WS DC project
    <AdapterDataControl id="..."
    xmlns="http://xmlns.oracle.com/adfm/datacontrol">
    <Source>
    <definition xmlns="http://xmlns.oracle.com/adfm/adapter/webservice"
    name="..." version="1.0"
    provider="adf.sample.wsdc.CustomSOAProvider"
    wsdl="http://...">
    Frank

  • JEditorPane - set http header

    hi
    how to set (or is it even possible) to set http header (in http request) in JEditorPane (to set referrer, user agent, etc.)
    thanks a lot

    Thanks Raja,
    I am not an ITS expert by any means. I need help to work out how use the information in OSS Note 494984 to solve my problem.
    The note seems to be about setting headers on all incoming requests to ITS.
    I need to set the content-type header on an outgoing response generated using a specific (XML) template.
    I did the BC440 course back in 2000 but after 2000 I never did another ITS project, focusing on Java and J2EE instead. So I am not sure how to apply what the OSS Note says. Do I need to assign the content type to a Business HTML parameter in the template? The documentation I have with SAP@Web Studio is not helpful.

Maybe you are looking for

  • I Tunes question

    Everytime I open up I tunes, it duplicates all my folders in the playlist section except for the folders I`ve made. It imports all my songs all over again. It says importing itunes library xmtl.Any ideas?

  • Join two tables using union

    Hi Gurus, I have three tables. I want to join all tables using union in SQL statement. The query is returning all the records from both tables but i only require unique rows based on a specific column value. Here is my table structure - TableA - LIC_

  • "sign" function gone after updating to 10.1.10 -Adobe Reader

    "sign" function gone after updating to 10.1.10 -Adobe Reader Button no longer exists for signing....

  • Formatting a HD for use in a macbook

    I have a new HD for my macbook. Is it best to format it befor use & if so, to what format. Many Thanks, Jeff

  • Connecting shuffle to another computer

    Just one quick question... Can I connect a 2nd gen shuffle to another computer without "syncing" it? My son has a 2nd gen shuffle and he has different songs on the computer at his mother house than the computer at my house. Can he put the songs from