Help getting user ID

Hello! i am a bit of a newbie to JSP and I have a problem. I am trying to run a simple jsp page that when run will display the id of the person logged into the PC. We are using tomcat and I have been trying the following
<html>
<head><title>Hello</title></head>
<body bgcolor="white">
<h2><font color="black">Hello,
${pageContext.request.userPrincipal.name} !</font></h2>
</body>
</html>
but all this does is return
"Hello, ${pageContext.request.userPrincipal.name} !"
So far I have not been able to figure this out. Would anyone know what I am doing wrong?
Thanks in advance

when user login your application, save user's id in a session :
String userId = request.getParameter("userId"); // assume you sumbit a form which has a field named "userId"
request.getSession().setAttribute("userId", userId) );
then, in your jsp, you can do:
<c:out value='${sessionScope.userId}' />
Hope that helps.

Similar Messages

  • I need help getting the license number for Adobe Photoshop Elements. However, It doesn't recognize me as an authorized user. Can someone help?

    I need help getting the license number for Adobe Photoshop Elements. However, It doesn't recognize me as an authorized user. Can someone help?@

    I am having the same problem...did you ever fix it?

  • How to get user attributes from LDAP authenticator

    I am using an LDAP authenticator and identity asserter to get user / group information.
    I would like to access LDAP attributes for the user in my ADF Taskflow (Deployed into webcenter spaces).
    Is there an available api to get all the user attributes through the established weblogic authenticator provider or do i have to directly connect to the LDAP server again?
    Any help would be appreciated

    Hi Julián,
    in fact, I've never worked with BSP iViews and so I don't know if there is a direct way to achieve what you want. Maybe you should ask within BSP forum...
    A possibility would be to create a proxy iView around the BSP iView (in fact: before the BSP AppIntegrator component) which reads the user names and passes this as application params to the BSP component. But this is
    Beginner
    Medium
    Advanced
    Also see http://help.sap.com/saphelp_nw04/helpdata/en/16/1e0541a407f06fe10000000a1550b0/frameset.htm
    Hope it helps
    Detlev

  • How to get user status in place of system status - B2C

    Hi,
    In our requirement for  B2C webshop, we need to replace the user stattus with the system status . In the standard B2C webshop, , we have only OPEN and COMPLETED orders, which related to system status - OPEN and COMPLETED.
    I want to get user status in place of system status.
    Please  help me how to proceed with the things.
    Regards
    Yaswanth.K

    Done using Custom RFC and jsp modifications!

  • How to Get user profile properties in provider -cloud hosted app in sharepoint online - office 365 using REST API?

    How to Get user profile properties in provider -cloud hosted app in sharepoint online - office 365 using REST API?
    any idea?

    Hi,
    From your description, my understanding is that you want to get user profile properties in provider-hosted app in SharePoint online using REST API.
    Here is sample code for getting user profile properties:
    http://www.vrdmn.com/2013/07/sharepoint-2013-get-userprofile.html
    Here is a blog below about accessing data from the provider-host apps:
    http://dannyjessee.com/blog/index.php/2014/07/accessing-sharepoint-data-from-provider-hosted-apps-use-the-right-context/
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Grant access to help desk users to add members to distribution and security groups

    Hello,
    I am trying to create a set of help desk users that has full access to add or remove members from distribution and security groups as well as update users.  We want it to bypass owner approval and essentially allow this group to add or remove members
    in the FIM Portal and flow it down to ADS.
    This obviously works fine if one is a member of the Administrators set, but we want a second tier of power users with limitied rights compared to FIM Admins.  We have added the help desk team to the  Security Group Users and Group Users set as
    well as MPR "Security group management: Users can read selected attributes of group resources".
    The help desk users can update users in the Portal with no issue.  The can search groups with no issue but when they try to add members to a group they get the error "Access Denied".
    Any help is greatly appreciated.
    Thanks!

    I'm having very similar problem - I have users with delegated right to modify group membership only. User can add someone to group and it works fine, but when the same user is trying to remove and user from a group (even if this is the same user
    which was added a minute ago) he gets Access Denied:
    The
    request included members which the requestor is not authorized
    to add and/or remove from this group."
    It is caused by default MPR:
    Group management workflow: Validate requestor on remove member
    Question is how this activity validates this request - any insight?

  • Get User Agent (Browser) in Webdynpro 7.01

    Hello Community,
    Some time ago, I already asked this question. Then, we were on NW04. That was the Thread: [Old Thread|Get User Agent (Browser) in Webdynpro; 
    The solution to retrieve the User-Agent was:
    HttpServletRequest request =((IWebContextAdapter) WDWebContextAdapter.getWebContextAdapter()).getHttpServletRequest();
    Now, "IWebContextAdapter" does not work anymore. So I'm in need of another solution. The suggestion of
    HttpServletRequest request = (HttpServletRequest)WDProtocolAdapter.getProtocolAdapter().getRequestObject();
    String value = request.getHeader("<Param Name>");
    in the old thread still throws a "ClassCastException".
    I have also found this Thread: [Other Thread|Get User Agent;
    But here the suggestion is
    HttpServletRequest request = WDProtocolAdapter.getProtocolAdapter().getRequestObject().getProtocolRequest();      
    String userAgent = request.getHeader("User-Agent");
    what doesn't work, because it seems, there is no method "getProtocolRequest()".
    I'd be glad, if anyone would suggest a working way of how to retrieve the User Agent in webdynpro NW 7.0 EHP 1 SPS 04.
    Thank you very much,
    Best regards,
    Christian

    Hi Christian,
    Can you try using this line of code. You can directly get the value of the request object using this.
    WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameter("parameter_name");
    // There is getParameterMap() method in which you can know what all parameters are available to be captured.
    Map parameterMap =   WDProtocolAdapter.getProtocolAdapter().getRequestObject().getParameterMap();
    I hope this helps.
    Thanks and Regards,
    Pravesh

  • Getting User Id which Approved Human Task

    Hello,
    how can I get User which approved Human Task in BPM Workspace. My Task is assigned to role but I need to know which one user approved form and have moved it to next stage of my process.
    Thanks

    Hi any one can help my scenario I am new to BPM/SOA,
    I want to use this Xpath function for getting the previous task approver.{ hwf:getPreviousTaskApprover(bpmn:getDataObject('taskID'))}
    Let me know what exactly taskID is ?
    Can you please provide exact syntax and with any examples.
    Thanks & regards,
    Raju.

  • Getting user info with integrated dot net app.

    To start, I know nothing about SAP integration. This has been thrown at me to try to resolve.
    I need to integrate a dot net app into SAP. I need to know who the user is that is accessing my .ascx page.
    I found this:
            Dim userInfo As Map = DirectCast(Request.getAttribute(PortletRequest.USER_INFO), Map)
            lblUserID.Text = DirectCast(userInfo.[get]("user.name.given"), String)
    And This:
    <portlet-app>
    <user-attribute>
    <description>User Given Name</description>
    <name>user.name.given</name>
    </user-attribute>...
    Any help would be appreciated, and again, if you can help I will need complete help, because as Sgt Schultz would always say..
    I know nooooothing...
    Edited by: Raymond Blair on Dec 15, 2008 5:40 PM

    Hello Raymond,
    For developing .NET applications I would recommend you to evaluate [PDK for .NET|https://www.sdn.sap.com/irj/sdn/dotnet?rid=/webcontent/uuid/40be5378-bfa9-2b10-399b-ba5719c0b5b8] ( Portal Development Kit for Microsoft .NET ). As a part of its installation, you get documentation integrated into Visual Studio help. It contains a set of very helpful tutorials.
    Best Regards,
    Rima.

  • Problems with getting user input

    Hi All,
    I want to get user input from a command line and i am NOT using a GUI.
    The user can still see their password when they are typing it in.
    Is there anyway to show '******' when they type in their password??
    This is what I have so far..
    public static void getPassword() {
    System.out.print("Enter password-->");
    DataInputStream input = new DataInputStream(System.in);
    try{  
    password = input.readLine();
    catch (IOException e){
    System.out.println("ERROR " + e);
    Any help would be greatly appreciated.
    Thanks
    Kal.

    Kal,
    I'm pretty sure you're going to need some kind of GUI (either a Java window or an HTML page) to get the desired effect. There might be a way to set the echo character in the command line, but I'm not sure.
    - Sheepy

  • Any way to give Help Desk Users access to tickets by Category?

    As far as I know, there's just no way to do this.  The user roles are not very flexible and really don't provide any middle ground by design.  You can either see all tickets or you can see only tickets assigned to you.

    So we have our first level Help Desk people that get ALL the tickets that come in.  They are Help Desk Admins as they route things around and manage the system.
    We also have our Database team that we sometimes have to assign tickets to.  We don't want them to see all the tickets so I think I have to set them as Help Desk Users.
    Based on the documentation, this means they won't see anything except what's already assigned to them personally.
    What we'd like to be able to do is create a Category called Database and set the Database users up so they can see their own tickets and any ticket that's assigned to the Database Category.  Is there any way to do this or an alternative way that we can accomplish the same end result?
    Thanks.
    This topic first appeared in the Spiceworks Community

  • Having the same problem with Adobe Story. Getting a warning that says "Failed to get user preference

    Having the same problem with Adobe Story. Getting a warning that says "Failed to get user preferences, lost the internet connection." Any help would be greatly appreciated. Phone support was useless

    Yes, me, just now! I was thinking it was because I am on a brand new computer and I did something wrong when I put itunes on it. But now I am thinking it is an itunes issue, not mine.

  • I loaded what I guess is the new version of Firefox and it completely changed my whole task bar. I don't have my Norton Logins with stored passwords, and it's hard to find my favorites. Help get it back to how it was.

    I loaded what I guess is the new version of Firefox and it completely changed my whole task bar. I don't have my Norton Logins with stored passwords, and it's hard to find my favorites. Help get it back to how it was.

    Credit Tony E
    To downgrade to Firefox 3.6 first uninstall Firefox 4, but do not select the option to "Remove my Firefox personal data". If you select that option it will delete your bookmarks, passwords and other user data. See https://support.mozilla.com/kb/Uninstalling+Firefox
    You can then install the latest version of Firefox 3.6 available from http://www.mozilla.com/en-US/firefox/all-older.html - it will automatically use your current bookmarks, passwords etc.
    To avoid possible problems with downgrading, I recommend going to your profile folder and deleting the following files if they exist - extensions.cache, extensions.rdf, extensions.ini, extensions.sqlite and localstore.rdf. Deleting these files will force Firefox to rebuild the list of installed extensions, checking their compatibility, and reset toolbar customizations.
    For details of how to find your profile folder see https://support.mozilla.com/kb/Profiles

  • I haven't used an Apple computer for years. I need help getting started

    I just bought a mac mini after 20 years using a PC.  I need help getting started.  Any beginning manuals out there?  Thanks.

    New User of Apple wrote:
    I just bought a mac mini after 20 years using a PC.  I need help getting started.  Any beginning manuals out there?  Thanks.
    Welcome back. Do not overlook the Finder and individual application Help menu support. The links provided above are great starter references. With tongue in cheek, they also may not be as current as the OS X release on your mini, so expect some differences.
    Here are a litany of keyboard short-cuts, last updated in June 2012, that may prove selectively beneficial.
    For actions like copy(c), paste(v), cut(x), print(p), and select-all(a), substitute the command key instead of control key.
    If you right click on a file, this menu will seem familiar. Press the option key and notice the menu changes. If you copy a file(s) from this menu, change to the destination and then press option with the right button menu to see copy file(s) changed to move file(s).
    To quickly view a file's contents, left click on the file icon, then press the space bar.
    The native file format for OS X is PDF. Thus, when you choose to print, you also have the option to save as PDF with web links preserved.
    Enjoy your mini.

  • Getting USERS data in a Multiple LDAP scenario

    Hi All
    We have users in 3 entirely different domains....with different LDAP existing....While getting users data in CUP from LDAP, how do I establish a connection with all of them....? Shall I create different LDAP connectors for them? But I can only determine one user data source....at a time
    Please advice if there is some other option
    Thanks
    Abhijeet

    Hello Abhijeet,
    Yes you have to create three different connectors for all the LDAP systems and you can fetch user data from different systems too. From  AC 5.3, you can define multiple user detail souces in CUP and assign priority to them
    Here is a document on BPX that may help you in configuring the same:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/b07a775f-038e-2b10-4091-e7cfc47ec9b0
    Hope this answers the query.
    Harleen
    SAP GRC RIG

Maybe you are looking for

  • Ihave 51 iphoto library and they keep increasing and i do not know why

    My iphoto has 51 libraries and they keep increasing and i do not know why, i would like only one iphoto library and consolidate all photos in that.

  • IMac no longer connects to airport express

    Good evening. Thank you for looking. Running an iMac 2010 with Yosmite latest. Yesterday, I could not wifi connect to my airport express. iPhone and iPad and laptop all connect to it great. I've tried deleting the wifi route in settings/network and r

  • MyiPhone 3gs random shutdown

    My iPhone 3gs shutsdown randomly when a SIM is inserted but otherwise works OK

  • Decimals upto 4

    Hi all     I have to save a decimal number in the database upto 4 decimal places.But when I gave datatype DEC for the domain and length 16 , 4-decimal places it is only saving upto 2 decimal places(I can see on screen).I also gave output length as 21

  • Extractions from Searchable PDFs - Even After Auto-Tagging Cannot Save as PDF/A

    I'm currently extracting relevant parts from 100+ page PDF files, but cannot save the extractions as PDF/A if they come from a searchable version, even after adding auto-tagging via the Accessibility function, but I can do so if they come from a non-