Any way to add HTTP Header info before redirect?

I have a third party web site that requires basic authentication. My servlet knows the userid and password from its own database. Is there some way I can add the encoded authorization header before I do a response.sendRedirect( ) ??
I just can't find a way to do this, even by creating a wrapper class for HttpServeletRequest that uses the request supplied to my servlet for all its work (the container must use request info that is not in the HttpServletRequest interface).
I was thinking that I could have my servlet add the request Header for basic authentication and do a forward(..) to another servlet in my context, which in turn does a response.sendRedirect( ) to the third party BBS, but I can't find ANY way to muck with the request Headers. Any help is GREATLY appreciated!
-- Dave D.

I too am in need of this now... was a solution ever found? Can someone procide one?
HttpServletRequest req = context.getRequest();
HttpServletResponse res = context.getResponse();
HttpSession ses = req.getSession(true);
res.setHeader("sH", "setanewHeader");
res.addHeader("aH", "addanewHeader");
res.sendRedirect(res.encodeRedirectURL( req.getHeader("referer") );
i can't seem to reference sH or aH in my page and they don't seem to be in the response.
thx

Similar Messages

  • Any way to get HTTP header in web dynpro Java?

    Is there any way to get HTTP header in web dynpro java? This method gives me the params. Is params same as header? It doesn't have any way to retrieve header data. I am on NW 7.0.19
    WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("param");

    Dear Faraz,
    I'm afraid the code you've pasted is only to retrieve URL parameters.
    Have you tried this document to see if it offers any good hint:
    [http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0446f5c-fcb9-2910-e082-88becbe3ddc9]
    Not sure if you can process the HTTP header with a WD4J.
    An alternative could be to develop some Portal component in plain JAVA working as a proxy to call your WD4J afterwards.
    That portal component would process your HTTP header and forward any parameter to your WD4J.
    But this is me just guessing.
    Kind Regards
    /Ricardo

  • Any way to add a drive to Spotlight Privacy BEFORE connecting it?

    I want to move a few files over from the External drive of another computer, but I don't want either that drive or the drive of the "target" computer to start indexing (I'm not using the term "target" here as in +Target Disk Mode+.) Is there any way to add that External drive to Privacy before I even connect it? As indexing will already have begun, I don't want to wait until the drive is already connected and then drag it into Privacy.
    I've noticed that if I use the "add" button in Spotlight Privacy, it only gives me the option to select Folders/Locations already on the drive, with no way to simply enter the name of the External Volume into Privacy by typing it. Can I trick it into doing this by creating an empty Folder with the name of that drive and then adding that Folder to Privacy?
    And, is there any way, without dragging the drive of the "target" computer into Privacy, to prevent it from starting to index the contents of the External?
    In other words, I'd like the entire operation to have nothing to do with Spotlight. Disabling Spotlight entirely is not an option, since I use it in a very limited way for Mail and very occasionally for searching.

    Then what's the next best option (assuming there is a next best option of any kind): drag the icon of the external into Privacy as soon as it mounts? (This is an external clone that's always in Privacy on its home computer, anyway.*) And drag the "home" computer's icon into Privacy as soon as the external mounts, also, and then re-index it once the external is unmounted? Can it be done this way, i.e. by interrupting the immediate indexing that will take place by moving both volumes into Privacy?
    *According to what you said, since that volume is set in Privacy on its home computer, would that mean it won't try to index the internal to which it is mounted, even if moved to a different computer (but different OS, Leo not Tiger?) But the Leo (internal) will still try to index the contents of the external (Tiger)? In other words, are there two different (simultaneous?) indexings possible: the external (clone) tries to index the internal volume on which it is mounted, and the internal tries to index the additional volume of the external which has just been mounted to it? This stuff gets confusing.
    Message was edited by: WZZZ

  • Any way to add 'Actions' tab on Service order Item level in ICWeb?

    Hello,
    We are implementing Service orders under CRM2007 Interaction Center.
    When we access the Service Orders through backend (t-code CRMD_ORDER), we see an 'Actions' tab on the Item Level which captures all the actions executed at Item Level. This tab is not available from the UI.
    Is there any way to add it to the UI? Note that it is available from both backend and UI at Header level but only from backend at the Item level.
    Thanks,

    Hi Deepali,
    I checked the TCODE CRMD_ORDER, there are buttons like AVAILABILITY CHECK on the item level.
    When you say it is an Item view on the Web UI, I believe it is a Table View.
    In Table Views you will have ON CLICK ACTION buttons next to the Row Selectors.
    For most of the views it will be available by default.Identify the Web UI component and open it through BSP_WD_CMPWB.Select the view and open the context node class and check if there is a method
    GET_OCA_T_TABLE.
    This method will have the code like this, for the buttons
      ls_one_click_action-id      = 'DELETE'.
      ls_one_click_action-icon    = 'delete.gif'.
      ls_one_click_action-text    = ''.
      ls_one_click_action-tooltip = cl_wd_utilities=>get_otr_text_by_alias( 'CRM_IC_APPL/DELETE' ).
      ls_one_click_action-active  = 'X'.
      APPEND ls_one_click_action TO rt_actions.
    If your component also has these things, then you can simply add the ACTIONS column using Configuration Tool else you need to add this column by coding, redefine the method GET_OCA_T_TABLE and add the buttons.
    You need to explicitly create event handlers for the button click actions.
    Mostly,it should be available to you by default as it is available in SAP GUI.
    Regards,
    Masood Imrani S.

  • Any way to add a link FROM HomePage TO iWeb?

    Any way to add a link FROM HomePage TO iWeb? The instruction I found in Help only discussed adding a link from iWeb to HomePage. Since most of my family already accesses my HomePage, I'd like to be able to add a link to the iWeb pages
    This is the only instruction I've been able to find in connection with this topic: "If you’ve previously published webpages using HomePage, those pages are still available at http://homepage.mac.com/YourMemberName. Websites you create in iWeb are available at http://web.mac.com/YourMemberName/iweb/SiteName. If you’ve created webpages using the .Mac HomePage feature, you can put a link to your old homepage on the first page of your new iWeb site. On your iDisk, your HomePage sites are stored in the Sites folder. Your iWeb sites are in the Web folder."
    Thanks
        I use both my Mac and my Dell

    I'll try this, but why in the world should it be so complex? I'll let you know if it works. but how do we tell Apple/Mac that this shouldn't be rocket science, but rather something that's done with the click of a button. They're both .mac software products. Why can't they talk to each other?
    B
        I use both my Mac and my Dell

  • After upgrading to OS Mavericks, I realized that the Partition for Windows is gone. I have really important data on this drive without a back up. Is there any way I can get this data before reformatting. Is there any third party software for receiving the

    After upgrading to OS Mavericks, I realized that the Partition for Windows is gone. I have really important data on this drive without a back up. Is there any way I can get this data before reformatting. Is there any third party software for receiving the data or any possible way? Money is not a limitation to this fix. Please help!!!

    sure pretty simple.  make a backup of your current settings
    http://support.apple.com/kb/HT1766?viewlocale=en_US
    then restore device from old backup you need pics off of
    then import pics to computer
    http://support.apple.com/kb/HT4083
    you may need to save pics to camera roll first
    then restore the new backup and sync pics back to phone via itunes
    Peace, Clyde

  • Is there any way that will notify me first before purchasing in iTunes? I have lots of purchased in iTunes in my credit card.

    Is there any way that will notify me first before purchasing in iTunes? I have lots of purchased in iTunes in my credit card that I didn't buy. Pls help.

    You should be prompted to enter your password when buying, if you aren't then on your iPhone you can set Settings > General > Restrictions > Require Password to 'Immediately' so that it has to be entered for every purchase (that setting has a default of 15 minutes during which it doesn't need re-entering).
    If you've been charged for items that you haven't bought then you can try contact iTunes Support via this link : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • I keep on forgetting ALT B (I think that's it). Is there any way to add options to the bookmark pulldown, specifically "Bookmark all Tabs" ?

    I keep on forgetting <ALT> B (I think that's it)?
    Is there any way to add the "Keep All Tabs" to the pulldown Bookmark menu?

    You can make all hidden menu entries visible with this code in userChrome.css below the @namespace line.
    * http://kb.mozillazine.org/userChrome.css
    * http://kb.mozillazine.org/Editing_configuration
    You can use the ChromEdit Plus or Stylish extension to have easier access to the customization files.
    * ChromEdit Plus: http://webdesigns.ms11.net/chromeditp.html
    <pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    #navigator-toolbox menuitem[class="show-only-for-keyboard"]{ display:-moz-box!important; }
    </nowiki></pre>

  • Is there any way to add watermark on iMovie 10.0.1 version?

    Is there any way to add watermark on iMovie 10.0.1 version? I could be able to do it in previous versions with enabling advanced settings.

    You do it 10.0.1 in much the same way you did in iMovie version 9. You use Picture-in-Picture.
    http://help.apple.com/imovie/mac/10.0/#mova1aaa682b
    Matt

  • Any way to add fonts to Keynote or Pages on the iPad?

    Are we stuck with the limited fonts in the apps or can more be added? Can't find any info on that. Imported a Keynote file from my Mac and it changed the font, made it look quite different.
    Anyone know anything about this yet?
    Thanks.

    I haven't heard of any way to add fonts to iWork for iPad, and the article Keynote for iPad: Frequently Asked Questions (FAQ) (What do I need to know about fonts?) confirms what you are seeing. It doesn't mention how to add fonts.
    ivan.

  • Is there any way to add a digital copy movie to an iPhone without syncing with my iTunes library? I use iCloud to sync, not iTunes. So when I go to sync movies, it deletes the other ones I already have loaded on the iPhone. Thanks.

    Is there any way to add a digital copy movie to an iPhone without syncing with my iTunes library? I use iCloud to sync, not iTunes. So when I go to sync movies, it deletes the other ones I already have loaded on the iPhone. Thanks.

    or is there a way to upload the digital copy to store in my iCloud account?

  • Is there any way to add PO no and  corresponding line item of PO in VL32N?

    Hello,
    The scenario is, we have created the IBD and deleted one of the line item and saved it.
    We went to VL32N and added the missing line item to IBD but PO number and corresponding item number of PO field of newly added line items are grayed out. We are not able to add PO number in VL32N screen.
    Is there any way to add PO number and corresponding line item of PO in VL32N screen of IBD? Our client does not want to create new IBD for same PO. He wants to add the line item in same IBD.
    Thanks,
    Milind
    Edited by: Csaba Szommer on Aug 27, 2011 4:52 PM

    Hello,
    This thread is pending since long time. No body has answered my question. Can any body suggest me?
    Thanks
    Milind

  • Is there any way to add a hyperlink to text in Messages.app?

    Is there any way to add a hyperlink to text in Messages.app? 
    I frequently share links via Messages and would like to have clickable text with a hyperlink beneath vs an ugly URL.

    Hi,
    In iChat and early versions of Messages this used to be CMD + K keys together
    This no longer works.
    It seems CMD + K is free as a Modifier keystroke.
    I would have  added it as an item in System Preferences > Keyboard > Shortcuts.
    The issue with that is the fact that there is also no longer an Menu item for it.  (so it does not work).
    You can add a URL and then Right Click and there is an Edit option but this only allows you to change the URL and not add a URL to existing unsent text.
    Right Clicking unlinked Text does not allow you to Edit it either (well there are some format option but not Hyperlinks)
    I can't find away around this.
    I know in the past the AIM service suffered from malicious code sent in Hyperlinks  so this might be the reason.
    9:56 pm      Monday; January 5, 2015
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • How to add HTTP Header Response X-Frame-Options:SAMEORIGIN from OWA published via Forefront TMG 2010 to stop Clickjacking

    How to add HTTP Header Response X-Frame-Options:SAMEORIGIN from OWA published via Forefront TMG 2010 to stop Clickjacking. I have put the IIS setting X-Frame-Options:SAMEORIGIN  on my Internal CAS Server. However as the OWA page is published through
    Forefront TMG 2010, the iFrame tag is not blocked when the page is first opened. Only when you login with your credentials to the OWA page inside the frame and the page reaches IIS on the Internal CAS it gets blocked. I want to block it in the first
    instance when it is opened from TMG.

    Hi,
    Thank you for the post.
    To modify the http header, please refer to this blog:
    http://tmgblog.richardhicks.com/2009/03/27/using-the-isa-http-filter-to-modify-via-headers-and-prevent-information-disclosure/
    Regards,
    Nick Gu - MSFT

  • Acrobat v9 JavaScript Alert Box - any way to add space or line break after each array item?

    I have a Document level Javascript used to identify blank required fields and is triggered on document actions, Print and Save. The script identifies the blank required fields, counts them, and outputs to an Alert box indicating the number of required fields blank and lists the fields by tooltip name. The script identifies the required fields by an asterisk at the end of each tool tip.
    My question is there any way to add a space or a line break after the comma for each listed item?
    Here is an image of the output where the listed items are all run together.
    Here is the code:
    function validateFields()
    //a counter for the number of empty fields
    var flg = 0
    // count all the form fields
    var n = this.numFields
    //create an array to contain the names of required fields
    //if they are determined to be empty
    var fArr = new Array();
    //loop through all fields and check for those that are required
    // all fields that have a '*' in their tool tip are required
    for(var i = 0;i<n;i++){
    var fn = this.getNthFieldName(i);
    var f = this.getField(fn);
    //tool tip is the fields\'s 'userName' property;
    var tt = f.userName
    //test for the '*';
    if(tt.indexOf('*')!=-1 && f.value == f.defaultValue){
    //increment the counter of empty fields;
    flg++;
    //add the fields userName (tool tip) to the list of empty field names;
    fArr[fArr.length] = tt;
    //now display a message if there are empty fields
    if(flg>0){
    app.alert('There are '+flg+' fields that require a value\n\n'+ fArr,3)
    else{
    this.print();

    Thank you! The alert box array items now have a line break, image below.  You know you have made my day and possibly several weeks as now I have more understanding about how to apply everything I have been reading in the Acrobat JavaScript guide and of course as soon as you pointed out using a "join", that triggered some old-days of working with Access and SQL queries.
    I will work on the required attribute to see how I might reference it.  I am laughing at myself now - good luck to me in figuring it out as I was very stick-in-the-mud regarding the line break issue.
    Thanks again and here is the result of the updated code:

Maybe you are looking for