How to set and pass a Header Varible in Jsp

Hi ,
I am using Headervariable login module(which takes user id form http header variable) for single sign on.
I configured the login module stack. But to test i need a jsp from which i can pass the user id in http header.
to test if i am able to set the user id in http header , i  have written 2 jsps
1. Header.jsp
In this , i am setting the user id
response.addHeader("UserId" ,"user1");
and i am posting it to HeaderResult.jsp
2.HeaderResult.jsp
In this, i am tryng to rretrieve it By using
request.getHeader("UserId");
But i am not geeting any value.
Can i set user defined header variables?if not, can i set the standard http header variabes,
Please help me with the code.
Thanks,
Lakshmi

Hi Deltev,
Yes it will be lost, should i use request.servervariable(Http_userid)?
The Headeresult.jsp is only to test if i am able to set the header .
Actaully ,from Header.jsp i am calling the portal(Login module stack configured to HeaderVaribleLogin).
the poratl expects the userid  from Http Header from jsp i need to send this in header.
How do i do this. I am missing something while passing the userid in header.
Please lete me know.
Thanks,
Lakshmi

Similar Messages

  • How to set height of JTable Header ?

    How to set height of JTable Header and set the text to another size ?

    You can set the font of the header as you can for any component. The font will dictate the preferred height of the header. If you don't like the preferred height, you can set that as well.
    // add table to a scroll pane or the header will not appear
    JTable table = new JTable(...);
    container.add(new JScrollPane(table));
    // get a reference to the header, set the font
    JTableHeader header = table.getTableHeader();
    header.setFont(new Font(...));
    // set the preferred height of the header to 50 pixels.
    // the width is ignored by the scroll pane.
    header.setPreferredSize(new Dimension(1, 50));Mitch Goldstein
    Author, Hardcore JFC (Cambridge Univ Press)
    [email protected]

  • How to Set and Use a global variable within a session?

    Dear All,
    I'm new to jsp, and would like to ask how to set and use a global variable within a session?
    Thanks in advance.
    Regards,
    Cecil

    With session.setAttribute("name",object) you can store a Attribute in the session object.
    with session.getAttribute("name") you can get it.
    That's it.
    Regards,
    Geri

  • How to set and save Custom Print Settings in Aperture?

    How to set and save Custom Print Settings in Aperture
    Hi,
    I am printing 12x18" images on 13x19" sheets. I find it difficult to enter the 13x19" dimensions because each value jumps to another random value when I move to enter the second dimension. For instance 13 jumps to, say, 8.5 as I type 19 into the second box. Same with the sheet dimensions.
    Also, when I finally get it all correctly, the margins don't set themselves automatically - which I would I expect.
    Then, even though I save the setting by clicking Save Setting at the gear below, next time I turn Aperture on, it's all gone.
    Any ideas? Thanks.
    Raphael

    For me, it is working with these settings, Raphael.
    Does your image have a 12x18" aspect ratio? You may want to crop it to the desired aspect ratio before printing.
    I can only test with Aperture 3.6 on Yosemite 10.1.

  • How to set and retrive the index log path stored by parameter LOG_DIRECTORY

    how to set and retrive the index log path stored by parameter LOG_DIRECTORY.

    http://download-west.oracle.com/docs/cd/B19306_01/network.102/b14213/lsnrctl.htm#sthref72
    http://download-west.oracle.com/docs/cd/B19306_01/network.102/b14213/cmctl.htm#sthref239

  • How to set and resent reconcilation a/c for Assent a/c

    hi
    how to set and resent reconcilation a/c for Assent a/c
    amk

    You are permitted to post the recon account undercertain special circumstances :
    USe the transaction codes OAMK and OASV.
    Kindly read the SAP on line documentation before making a postings directly to the recon account.
    Definition of the Reconciliation Accounts
    You are not allowed to manually post to the reconciliation accounts for Asset Accounting in Financial Accounting. Normally, you designate the corresponding General Ledger accounts in Financial Accounting as reconciliation accounts. This change, however, can no longer be made in Financial Accounting, once these accounts already have balances from the legacy data transfer. However, you can use a special report to assign these accounts the status of reconciliation accounts in Financial Accounting (in Customizing for Asset Accounting, choose Preparing for Production Startup ® Production Startup ® Set Reconciliation Accounts).
    There is another report for removing this specification (Reset Reconciliation Accounts).
    Subsequent Correction Postings to Reconciliation Accounts
    Suppose you have already defined the asset G/L accounts in Financial Accounting as reconciliation accounts, but still need to transfer balances to these accounts, or make corrections. You can make correction postings to these reconciliation accounts with a special posting transaction in Customizing for Asset Accounting (Transfer Balances), using posting key 40 or 50. You can only postings to those accounts in a company code with implementation status (Customizing for Asset Accounting, choose Preparing for Production Startup ® Production Startup ® Activate Company Code).

  • If user disable cookie how to set and use session with URL Rewritting

    if user disable cookie how to set and use session with URL Rewritting by append session ID in url

    If cookies are disabled, then app server will automatically try to use URL rewriting for session control. Programmer's responsibility is to encode any links or redirects using
    response.encodeURL("/yourPage.jsp")
    and
    response.encodeRedirectURL("/yourPage.jsp")
    See API for details
    http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletResponse.html#encodeURL(java.lang.String))

  • Reading a properties file in a servlet and passing its contents to a JSP pa

    Hi all,
    I'm totally new to Servlet pgmg n JSP. Please can ne1 tell how to read a simple properties file (in a servlet) and pass its contents to a JSP page.Actually the reason is to fill a combo box in a JSP page with the contents of a properties file.If calling a servlet for the same is d best way to do that, plz can ne1 tell me :
    1> whether to override the doPost method in the servlet in which to read d file using FileInputStream
    2> Putting the contents in an array and then how to pass this array to the JSP page.
    Thanks,
    deepthy.

    I'm using a properties file to let my web application know what the name of the database is. I'm using an abstract class GeneralDao which will be extended by all the DAO's (Data Access Objects or java classes containing SQL statements).
    Here's the code :
    protected Connection getDatabaseConnection()
              throws Melding
         Connection dbconn = null;     
         ResourceBundle resBundle;
         try
         Class.forName("com.mysql.jdbc.Driver").newInstance();
         resBundle = ResourceBundle.getBundle("gcoConfig");
         String dbConnectie = resBundle.getString("databaseconnection");
         gcoLogger.debug("lezen databaseconnection in resourceBundle " );
         dbconn = DriverManager.getConnection(dbConnectie);
         } catch (InstantiationException exc)The ResourceBundle is used to read the properties file, named gcoConfig.properties.
    With the getString() command I read the content of the string named databaseconnection.
    The gcoConfig.properties file is placed inside the folder C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\gco\WEB-INF\classes
    The GeneralDao is placed in the folder C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\gco\WEB-INF\classes\org\gertcuppens\cluifDao.
    So this class is placed some folder below the WEB-INF\classes folder of gcoConfig.properties.
    And the content of the properties file is just one line :
    databaseconnection=jdbc:mysql://localhost/cluif
    If you want to let the JSP know what's inside the properties file, wrap the content in a Javabean, put it in the request or even the session and pass the control to the JSP.

  • How to pass a header variable in jsp

    Hi ,
    I am using Headervariable login module(which takes user id form http header variable) for single sign on.
    I configured the login module stack. But to test i need a jsp from which i can pass the user id in http header.
    to test if i am able to set the user id in http header , i have written 2 jsps
    1. Header.jsp
    In this , i am setting the user id
    response.addHeader("UserId" ,"user1");
    and i am posting it to HeaderResult.jsp
    2.HeaderResult.jsp
    In this, i am tryng to rretrieve it By using
    request.getHeader("UserId");
    But i am not geeting any value.
    Can i set user defined header variables?if not, can i set the standard http header variabes,
    Please help me with the code.
    Thanks,
    Lakshmi

    Hi,
    check this thread
    http://help.sap.com/saphelp_nw04/helpdata/en/71/bcf3bf2ed7e142a5011b43c288f08c/content.htm
    HTTP Header parameters in iView.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/bc-jas/~form/handler
    May help you
    Regards,
    RK

  • How to validate and pass a value stored in the Check box to a SQL report

    I have a menu(parameter form) with select lists and two check boxes(one option for DD/MM/YY(called CHK_BOX_MTH) and other for Quarter(Called CHK_BOX_QTR)).
    If the user selects the check box for month, he should be only be able to select list of values for Month, Day and Year. The user should not be able to choose Quarter(or should be prompted with a message, "Check only one option"). Similarly if Quarter is chosen, DD/MM/YY should be disallowed.
    How do I code this validation in HTML DB and where would it reside on the item?
    How do I then pass these parameters(Checked box value) using a URL to another page as input?
    The query expects the following
    SELECT ... FROM DIM_DAY
    WHERE
    (:CHK_BOX_MTH IS NOT NULL AND START_DATE = ":SELECTED_DATE")
    OR
    (:CHK_BOX_QTR IS NOT NULL AND QTR = ":SELECTED_QTR");

    Vikas ,Thank you for your reply.
    The only reason I am not able to use the radio group because I am not able to place the items shown adjacent to Month in the page. The From Date and To date (user enterable fields) should appear to the right of the Month radio button and quarter item to the right of the quarter radio button.
    From Date : "Month" "Day" "Year" (should be displayed to the right of Month )
    End Date : "Month" "Day" "Year" (should be displayed to the bottom right of
    Month and above the Quarter line)
    I hope I am making sense.

  • How to set and search contact favorites

    As title.
    I know somewhere it showed that we can mark someone as "favorite" in Contact so that their call will not be blocked by "Do Not Disturb"
    But I do not know how to set the "favotite" and how to search who has beeen set as the "favorite"
    Please advise !!

    The SearchKey is created by Exchange when the Item is saved so after you have Saved the Item you'll need to use Load with a propertyset that includes that property to access it eg
    Appointment newappointment = new Appointment(service);
    newappointment.Start = DateTime.Now;
    newappointment.End = DateTime.Now.AddHours(1);
    newappointment.Subject = "testc";
    newappointment.Save(SendInvitationsMode.SendToNone);
    PropertySet aptPropset = new PropertySet(BasePropertySet.FirstClassProperties);
    ExtendedPropertyDefinition PR_SEARCH_KEY = new ExtendedPropertyDefinition(0x300B, MapiPropertyType.Binary);
    aptPropset.Add(PR_SEARCH_KEY);
    newappointment.Load(aptPropset);
    Byte[] SearchKeyVal = null;
    newappointment.TryGetProperty(PR_SEARCH_KEY,out SearchKeyVal);
    You can't bind to Item using the SearchKey the only Id that can be used to Bind to an Item is the EWSid. You can search for an Item that has that searchKey eg using the example above
    Byte[] SearchKeyVal = null;
    newappointment.TryGetProperty(PR_SEARCH_KEY,out SearchKeyVal);
    SearchFilter sfSearchFilter = new SearchFilter.IsEqualTo(PR_SEARCH_KEY, Convert.ToBase64String(SearchKeyVal));
    FindItemsResults<Item> fiResults = service.FindItems(WellKnownFolderName.Calendar, sfSearchFilter, new ItemView(1));
    if (fiResults.Items.Count == 1) {
    Appointment foundappointment = (Appointment)fiResults.Items[0];
    Console.WriteLine(foundappointment.Subject);
    Cheers
    Glen

  • How to set the default screen header structure of PA30?

    Hi,
    I am not talking about the screen header of a particular infotype, e.g. IT0002. I have managed to change the header for any infotype by changing  the structure of relevant screen header modifier.
    The question is, how to change the screen header at the initial screen of PA30?
    Because all settings in table V_582A_B are with an infotype number. No idea about how to change the default sreen header.
    thanks in advance.

    PA20 / PA30 Initial screen always maps to screen header '00' even if it's not in V_582A_B. Therefore, if you have an infotype currently maps to screen header '00' and plan to have initial screen header to be different than the header of this infotype, you'll need to re-configure this infotype to map to a different screen header.
    Rgds.

  • Autosave and retrieve - how to set and how to do?

    In a stressed moment I didn't save my file when closing the ID6. Any way I can retrieve the file in its latest possible state?
    Hunting the possibility myself i didn't find any setting for autosave or information of file location. Where do I find the setting and the location.
    br and thanks
    Knud

    Thanks, Peter, although I had hoped for another answer

  • How to set and apply scale to counters

    Hi,
    I want to use MS Performance Monitor on Windows Server 8 R2 to monitor my ASP.NET MVC 4 web application on production server.
    I want to include different counters related to memory, processor, no. of requests in ASP.NET applications, waiting time, execution time etc.
    But their measuring criterias are different from each other. Some may be in percent values, some in actual values.
    I am not sure how to set scale. When I change scale, the size of bars change on chart.
    Should I divide or multiply the bar value with scale factor to arrive at the actual value?
    Any help is appreciated.
    Regards,
    Suraj

    Hi,
    During real-time monitoring in Perfmon, you can choose the scale you want for each counter individually. For this one way is to double-click on the respective counter in the lower panel in perfmon. The 'Performance Monitor Properties' pop-up shows up.
    Here you can choose the exact scale you need for this counter.
    For the values, you will need to divide them by the scale to get the real values. Like a scale of 10.0 means something like, the counter value shown in graph is 10 times the actual.
    Hope this helps.
    Krati

  • How to run and pass parameters to exe file from the .txt file

    hi,
     i am facing problem with passing parameters to the .exe file which is run by labview.firstly i have  .txt script with parameters which i have to pass to .exe file. This .exe file is also a software and that script is written for it.And now i have to create  programm in labview which should fullfill following points.
      1. I have to use one knob named 'Run script'.If i pressed the knob ,it should open the Browser where i can choose .txt script file.
      2. .exe application should open(Path already chossen).
      3. after passing the parameters .exe application should closed.
      4.And labview now should update his parameter
    I can just open .exe file using Exce.vi but i dont getting any idea to do more than this.can somebody please help me?
    Solved!
    Go to Solution.

    This depends on the exe file. Does it retrieve the information as standard input or does it require the information as command line arguments?
    Depending on this, you can read the txt-file in LV (using the file functions) and pass the content to the System Exec.vi.
    Norbert 
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

Maybe you are looking for

  • Thinkpad A31 Docking Station

    Hi there,  I have a Thinkpad A31 - 2652 with Windows XP (SP3) and I would like to get a docking tray with the ability to have dual VGA monitors (both external monitors).  I understand that the "ThinkPad T, A, and X Series Dock" has both a VGA and a D

  • Fan Runs Constantly

    Recently defected from Windoze and bought myself a iMac; lovin' it! Odd thing is, several months after buying it, the fan activity seems to be increasing. The fan runs pretty much non-stop all the time. Even when I shutdown the iMac, there is still s

  • Quick selection & smart brush tools are freezing

    Hello!  As of the past couple days I have had issues using my quick selection and smart brush tools.  Every time I try to use either as soon as I start lassoing part of my image it freezes.  I can't click Command+D, I can't click anything else in my

  • Safari 5.1 has major scrolling problems in Blackboard

    I've given up on trying to use Safari when working in Blackboard. The new scrolling features fail miseraably. I can only get Safari to recognize text lower in a window if I resize the the browser window. The new features are nice, but this is a major

  • Something I miss or don't understand

    Hello all, SQL Developer 4.0.0.13.80 Windows XP 32 Bit 4 GB RAM, Intel Quad core 2.6 GHz Java 1.7.0.45 Oracle 11g I'm a user of SQL Developer since Raptor 1.something and since then I am missing some stuff in this IDE to smoothly use this application