How to print between head-Tags of a Portal component

Hello,
is it possible to print between the -Tags of the generated HTML-Code? I need to insert a JAVAScript between the tags.
Currently i am simply using the Writer-Object in the doContent() to print out the HTML-Code. But i found nothing how to access the head?
With best regards
Edited by: Björn Karpenstein on Aug 19, 2008 9:12 AM

Hi,
One way of doing this is by creating a new Servlet Responce in doContent method. This way you can set the head tag by yourself.
Here is the code:
// get the reference to the ServletResponse (exclusivly) and set the content type to HTML                         
ServletResponse sResponse = portalComponentRequest.getServletResponse(true);                                                    
sResponse.setContentType("text/html");                                                                           
// get the reference to the PrintWriter                                                                         
  PrintWriter writer = sResponse.getWriter();                                                                               
// write the HTML header                                                                               
writer.write("<html><head></head><body>\n");
Check if this suites your requirement, if not let me know.
Regards,
Praveen Gudapati

Similar Messages

  • Hi gurus  in BDC how to print the header on the top of the data

    hi gurus  in BDC how to print the header on the top of the data

    hi,
    while downloading the file using gui_download function module
    in that function module in  TABLES  filednames parameter is used to get headings
    example:
    CALL FUNCTION 'GUI_DOWNLOAD'
         EXPORTING
      BIN_FILESIZE                    =
           FILENAME                        = FILENAME1
          FILETYPE                        = 'ASC'
          WRITE_FIELD_SEPARATOR            = 'X'
         TABLES
           DATA_TAB                        =   T_ZETBR
          FIELDNAMES                       = IT_HEADER
    reward if useful,
    thanks and regards

  • How to remove the header tag in the XML data ?

    Hi All,
    I am sending an XML data from SFTP to Proxy, in that I want to remove the header tag (first tag) from the xml, while loading the data. how to do that ?

    Hi,
          It is not about the thing that, whether your source is XML or flat file. If you dont want some thing in your source file , dont consider it and dont map it with your target structure. think that, your not getting the header in your source.  What is the header here.
    <Emp_details>
    <Emp_Id> Employee No </Emp_Id>
    <Emp_Name> Employee Name </Emp_Name>
    </Emp_details>
    <Emp_details>
    <Emp_Id> 1234 </Emp_Id>
    <Emp_Name> xxxx </Emp_Name>
    </Emp_details>
    <Emp_details>
    <Emp_Id> 5678 </Emp_Id>
    <Emp_Name> yyy </Emp_Name>
    </Emp_details>
    you have two fields under node Emp_details. What do u want to avoid here?
    Regards,
    Reyaz

  • How to Print Sales header text at the end of last page of Main Window

    Dear All,
    I have a requirement to print Sales order header text at the end of Main of last page. I don't have footer window.When i use Bottom-End bottom.Only one line is printing.The header has 5 lines.
    Request you to provide <b>code</b>to handle this situation. Your response is highly appreciated
    Best Regards
    Praveen

    Hi,
    If u r using standard layout set RVORDER01.
    U can print that sales order header text in the following text element.
    /E SUPPLEMENT_TEXT.
    U can include ur text objects here.
    Then it gets printed.
    Regards,
    Veda Kumar

  • How to print the GR tag using customised output in TCode MIGO?

    Hi All,
    I created one customized output type for transaction MB90, it working fine for this transaction. So now my client want same smartform to be used in MIGO transaction. I confirgured same, whenever we post the document in MIGO it should the print the GR tag automatically, its not happening i.e its not prininting the GR tag.
    I want to print the GR tag from migo using z-output type. Pls let me know the solution.

    Hi,
       Please chek the following.
    1. Txn. NACE... Choose "ME" and click on "Output Types" ... check in you output types did you maintained the Form (WE01, WE02,WE03)
    2. Txn. NACE....Choose "ME" and click on "condition Records"... here maintain the details
    Trans./Event Type: WE
    Print Version: 1/2/3
    Print iten: 6
    Med: 1
    Dat: 4
    Lang: EN
    Under Communication maintain the "output Device" and flag "print immedi" and "release output"
    SPRO>MM>Inventory Management and Physical Inventory-->Output Determination..
    Here maintain the details
    1. Maintain Conditions
    2. Assign forms and Program
    Regards
    GK.
    Edited by: Gnana Kumar on Nov 11, 2010 11:46 AM

  • How to Print the text in a Text Area Component

    It is really amazing how much information is out there for
    Flex but you can never find what you are looking for :-(
    I am trying to print the contents of a text area component.
    If I just do addPage(Component Name) it works but it prints the
    whole conponent including the scrollbars, on the page. I just want
    the text. If I try to put the component name.text in addPage(), I
    get a "1067: Implicit coercion of a value of type String to an
    unrelated type flash.display:Sprite." error. Does anyone know how
    to do this?
    Any help would be greatly appreciated.
    Dave

    Is there anyone who can help with this? I really need a way
    to print the results.
    Thanks.
    Dave

  • Access to the head tag in a portal generated page

    We have a situation where we need to put some javascript in the <head> tag of a page so that it can be accessed by a javascript portlet. Any ideas?
    -Rob

    This capability is not there in 3.0.6 and 3.0.7. In 3.0.8 (due out end of this month), we have added a template capability which allows you to assign an html template to a page. The template could contain the javascript.
    In the interim, others have created an html portlet that contains the javascript, placed it on the page and turned it off by default. This works, but any user with customization rights to the page could remove it, so the title should read something like 'Do Not Remove!'

  • Writing HTML tags in Abstract Portal Component?

    Hi,
    I am trying to write some HTML tags in an Abstract Portal Component and I am facing problem to write  "/"
    Pls. let me know if there is any escape character or any other way of printing a "/" in a tag like as follows....
    response.write("</td>")
    <b>New Addition:</b>
      SORRY ... WE CAN Write </td> without any problem ..
      Due to some error on the top of the program this is wrongly shown...
    Thanks 
    Mrutyunjay
    Thanks & Regards
    Mrutyunjay

    Hi Nari,
    Follow the below steps:
    1. Store your properties files (test.properties, test_en.properties, test_xx.properties where xx is the locale ) in the folder PORTAL-INF ->Private ->classes
    2. In portalapp.xml for component-config, add this
    <property name="ResourceBundleName" value="test"/>
    3. In your abstract portal component you can use the below code to fetch the value for the key "SERVER_NAME".
        public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
             ResourceBundle resourceBundle = request.getResourceBundle();
             if(resourceBundle!=null)
                  response.write(resourceBundle.getString("SERVER_NAME"));
             else
                  response.write("Error");
    Let me know if you still face any issue.
    Thanks
    Prashant

  • How to access a  web service(.wsdl) from portal component.

    Hi ,
    Is there any document/tutorial available on how to access a webservice from portal component ?
    I have found this linkhttps://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/g-i/how to access a web service.htm...
    but the urls in the link are not working...
    i want  to know the steps to access webs service and sample code if some body has already done that..
    Thanks for the help.
    Lakshmi

    Hi Lakshmi,
    See the links below:
    http://help.sap.com/saphelp_nw04/helpdata/en/f0/581140d72dc442e10000000a1550b0/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/a3/918340d990ce62e10000000a155106/content.htm
    Hope this helps.
    Regards,
    Pooja.

  • How to use a Webservice (deployableproxy) within a portal component?

    hi,
    i need to know how to use a webservice using a deployable proxy within a portal component?
    i've created the proxies and they work (with servlets).
    i know how to use them in servletes (context lookup, jndi mapping, application references) but i cant find a way to use them in a portal component.. tried the context lookup way but cant figure out which jndi mapping to use.
    any help?
    thanks in advance,
    constantin

    i've found this document:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/43/cb2e29578c0262e10000000a11466f/frameset.htm
    but it doesn't help...
    i should add a privatesharing resource...
    <property name="PrivateSharingReference" value="SAPJ2EE::rh21.de/pca~wsproxy"/>
    which works
    this is my code
    public void doContent(IPortalComponentRequest request,IPortalComponentResponse response) {
       try {
         Context context = new InitialContext();
         WSPhonebook obj = (WSPhonebook) context.lookup("/wsclients/proxies/rh21.de/pca~wsproxy/de.rh21.wsproxy.phonebook.WSPhonebook");
         WSPhonebookViDocument phonebook = (WSPhonebookViDocument) obj.getLogicalPort("Config1Port_Document", WSPhonebookViDocument.class);
    } catch.....
    now the lookup works (i guess, no messages about that anymore), but i catch ClassNotDefFoundError-Exceptions, but the classes are there, i can strg+click them in the editor, they are in the used dc's etc.
    any help? its quite uurgent :/

  • How to print Group Header on page break in a subreport - CR XI

    Post Author: rickcf
    CA Forum: General
    I have a subreport that has 3 groups with only one group that has a heading.  When the report prints and a subreport group is split between two pages (on a page break) I would like the group heading to also print again at the top of the page- even with the word "continued..." also.  Right now only the main report page header prints.  How can I do this since there is no page header in a subreport?
    Thanks
    Rick

    Post Author: rickcf
    CA Forum: General
    Is there any way to test during detail processing time to see if a page break is occuring?  If so I could print out a fake header on the detail line, suppressing it only if the page breaks.  That is the only thing I can come up with to solve the issue.
    I am surprised the is not an option to reprint the group header on a page break.  That seems like a needed option and that is the standard in Foxpro reporting - there is a checkbox option to cover this scenario.
    A coworker did find a workaround to add a psudo page header to a subreport so if I can add that and put my group info in there it will also work.  I have not looked at the code yet though.
    I have another issue I am working on so this one might take a while to get back to.
    Rick

  • How to add XML Header tag to XML output from XI?

    Hi ,
    My requirement is I need to genarate the XML according to client requirements.
    I am able to genareate the XML with  <?xml version="1.0" encoding="UTF-8" ?>  as Header but client requiremetn is like this
    <?xml version="1.0" encoding="UTF-8" ?>
    <?Label MEXICO|PROFILE|2033169|SUCCESS?>
    and hear MEXICO and 2033169 will change dynamically for every xml genaration. How it make as dynamical and how can I achive this.?
    Plz guid me...
    Thanks
    Krishna

    You can refer to the code provided in this thread XML Tag Issue: Need extra Line with Xml RooTag and Convert the IDOC XML file into single string? . Java mapping would do these steps -
    a) Convert the incoming xml into string.
    b) Modify it with some string function as per requirement.
    c) Convert the string back to xml.
    For more understanding about Java mapping, go through links provided in the thread java mapping .
    Regards,
    Sunil Chandra

  • How to print different  header & item data in new pages using smart forms.

    Hi,
    In smart forms I am trying to print header data & their item data. But there are more than one header data for a given input.
    I want to print all the different header data with their item data in new pages using smart forms. Can any one please help to solve the issue.. Its very urgent for me..
    Regards,
    Brajesh

    Hi
    U need to use control break statements to acheive ur requirement.
    Regards,
    Priya

  • How to print the header information journal from FB03

    Hi
    I would like the FB03 to show the header e.g. Entered by/ Parked by on the screen, without clicking the header button.  So I can print the journal via printer with those information.
    Thank you
    Sirirak

    Hey,
    This also depends from the SAP release that you are using.
    Release undependent I suppose you have the following possibilities:
    - Use the line item extract report S_ALR_87012347.  Here at least you can see the entry date (this transaction does of course not work for parked documents.
    - Create a query on an infoset mit logical database BRM
    Best regards,
    Koen

  • How are the subst data tags used in Portal Server

    I noticed this tags in the authentication pages, where are they stored? How do I modify their value? How are they used? A reference to the admin or programers guide is plenty I just couldn't find one.
    Thanks!

    They are defined in the auth module properties files (however I don't think any are defined in the product as it ships). The tags are of the form:
    <subst data="key">othervalue</subst>
    If the key is defined, the value of the key is substituted for othervalue, otherwise it is left untouched.
    Stephen

Maybe you are looking for

  • How do I add another contact to a group on a text message

    How do I add another contact to a group that has already been used on a text message ?

  • IOMMU explanation of kernel parameters

    Hello! I've set up an HTPC with an AMD A4-5300 CPU, A75 (Hudson-D3) chipset and a PCIe sound card (Asus Xonar DX). Whenever I tried to get a sound out of it (e.g. aplay blubb.wav) I only got dozens of these messages in the kernel log: [ 46.215678] AM

  • How to change the size of redo file

    Deal all, I finish installed the db,and the size of redo file is 50m by default. I found many "checkpoint not complete" events in alert.log file. Now i want to change it to 100M and try to avoid the event appear again ,how can i do?

  • Items start at login but are not in login items list

    items start at login but are not in login items list

  • Application crashes in 10.5.5

    since the update to 10.5.5 several applications, which have been running smoothly now stopped working outputting a similar error. to me it looks like the ppc > intel translation process screws up (but this is only a wild guess). i have attached the e