Getting Windows Username In A Page

Hello,
I am currently developing an application that requires to know the Windows username, these are generic and will be used as a terminal. I was wondering if it is possible to get this information? I know I can use javascript and a active x control but I don't really want to go down that route.
Our technology stack is:
Apex 4.2.2.00.11
Apex Listener 2
Oracle 10g, 10.2.0.4.0
Thanks,
Paul.

Here's a barebones script that you can call from a script in your form to retrieve the login name of the user:
// Folder-level JavaScript function
var getLoginName = app.trustedFunction(
    function () {
        // Get and return the user's login name
        app.beginPriv();
        return identity.loginName;
        app.EndPriv();
This needs to be included in a JavaScript file that's installed in the correct location. It's just a text file, so you can create/edit it with a text editor, but make sure the extension is ".js". For more information about how to determine where to place the file, see: http://acrobatusers.com/tutorials/2006/folder_level_scripts
More information on all of this is in the Acrobat JavaScript reference: http://www.adobe.com/devnet/acrobat/javascript.html
To populate a text field with the login name, do something like:
// Populate field with loginName
getField("text1").value = getLoginName();
Change "text1" with the actual name of the field in your form. You can place this code in a document-level JavaScript so it executes when the form is opened.
Note that all of this code is the bare minimum, and you may want to expand it to check for errors, etc.

Similar Messages

  • How to get windows username printed on each page irrespective of application? we have cm6030f.

    How to get windows username printed on each page irrespective of application? we have HP CM6030F.

    Hi,
    Normally, you will receive a Windows Azure Pass from your local Windows Azure team. Please try to contact your local Windows Azure contact (http://support.microsoft.com/gp/customer-service-phone-numbers?wa=wsignin1.0
    Also, you could see this page
    http://www.windowsazurepass.com/AzureU/AcademicFAQ and apply the free trial azure via (http://www.windowsazurepass.com/AzureU/).
    Q: I am a student. Can I apply for a pass?                     
    A: Windows Azure Educator Grants are only for valid faculty. If your faculty has been awarded a Windows Azure Educator Grant, you will be able to get a pass through him/her for you coursework. If you are interested in learning more about Windows Azure,
    we encourage you to share these Educator Grants with your faculty or sign up for the FREE 3-month trial offer. 
    Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to get windows username & password

    Hi friends,
    Requirement is to get windows username & password,
    My server is Tomcat4.0,
    My code in login.jsp page is
    <%
    String auth = request.getHeader("Authorization");
    if (auth == null) {
    response.setStatus(response.SC_UNAUTHORIZED);
    response.setHeader("WWW-Authenticate", "NTLM");
    return;
    if (auth.startsWith("NTLM ")) {
    byte[] msg = new sun.misc.BASE64Decoder().decodeBuffer(auth.substring(5));
    int off = 0, length, offset;
    String s;
    if (msg[8] == 1) {
    off = 18;
    byte z = 0;
    byte[] msg1 = {(byte)'N', (byte)'T', (byte)'L', (byte)'M', (byte)'S',
    (byte)'S', (byte)'P', z,
    (byte)2, z, z, z, z, z, z, z,
    (byte)40, z, z, z, (byte)1, (byte)130, z, z,
    z, (byte)2, (byte)2, (byte)2, z, z, z, z, //
    z, z, z, z, z, z, z, z};
    response.setStatus(response.SC_UNAUTHORIZED);
    response.setHeader("WWW-Authenticate", "NTLM "
    + new sun.misc.BASE64Encoder().encodeBuffer(msg1).trim());
    return;
    else if (msg[8] == 3) {
    off = 30;
    length = msg[off+17]*256 + msg[off+16];
    offset = msg[off+19]*256 + msg[off+18];
    s = new String(msg, offset, length);
    //out.println(s + " ");--------------------------> here getting system_name
    else
    return;
    length = msg[off+1]*256 + msg[off];
    offset = msg[off+3]*256 + msg[off+2];
    s = new String(msg, offset, length);
    //out.println(s + " ");
    length = msg[off+9]*256 + msg[off+8];
    offset = msg[off+11]*256 + msg[off+10];
    s = new String(msg, offset, length);
    out.println("Hello <span style='position:relative; width:190;"
    + " height:10;filter:glow(Color=#009966,Strength=1)'>");
    out.println(s + "</SPAN>");----------------------------------->here getting loginname.
    %>
    from this i was able to get systemname & username,How do i get password.
    Is it possible to get password?
    Thanks,
    Satya.

    There's no way to get the password. NTLM uses a two-round challenge-response scheme which never send the password (neither clear nor encrypted) on the wire.
    Why do you need the user's password? Is your service going to access a backend service using the user's credential? If so, you may need to use Kerberos delegation.

  • How get windows username

    Hi,
    In my java application I have following code to get windows username-
    *<%*
    String s1 = System.getProperty("user.name");
    out.println("The Username : "+s1+" ");
    String s2 = System.getenv("USERNAME");
    out.println("The Username : "+s2);
    *%>*
    If I log in to my PC and execute it I get correct output for both the statements, But when I execute it on server machine(when I logged in) I get the output as-
    The Username : SYSTEM The Username : null
    I use Apache Tomcat 5.5 to run the jsp on both (PC & server) machines. One small difference is I use eclipse on my PC and I don't use eclipse on server (I think it doesn't matter).
    But when I use the same code inside a java class I get correct output on both (PC & server) machines.
    Can any one solve my problem.
    Thanks in advance,
    Tiijnar

    tiijnar wrote:
    Hi BalusC,
    Thanks for the reply.
    Could you please be more elaborted on this. What I mean is- can you provide me the code for the applet.Just the same code. Use System#getProperty() in an applet. The only difference is that the applet runs at the client machine and the Java web application runs at the server machine. If your problem is rather that you don't know how to use applets, just check the applet tutorial here at sun.com. Google can find it.
    Moreover when I execute jsp on my PC, I execute it on localhost (a server inside my PC). I face the problem when I host my application on my server machine.D'oh. On "localhost" the client and the server are physically on the same machine.

  • Getting Windows Username of the Client m/c

    Hi,
    I want to be able to get the userid of a person when they call a servlet which is residing on a server.
    The person will log into his own computer using his user id and when he calls my servlet which
    is on my server over a network, I will be able to retrieve his user id .
    Thanx in advance
    bye

    Why don't you include these informations with the POST (or GET) message to the servlet?
    just use:
    http://....../servlet?userLogin=User Name&userPassword=765
    at the servlet, you can retrieve these info using the getParameter() command:
       public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
    String usrId = request.getParameter("userLogin");
    String usrPassword = request.getParameter("userPassword");
    .....

  • How 2 get WINDOWS USERNAME in a JSP

    <%@ page import="sun.misc.BASE64Encoder" %>
    <%
    String auth = request.getHeader("Authorization");
    if (auth == null) {
    response.setStatus(response.SC_UNAUTHORIZED);
    response.setHeader("WWW-Authenticate", "NTLM");
    return;
    if (auth.startsWith("NTLM ")) {
    byte[] msg = new sun.misc.BASE64Decoder().decodeBuffer(auth.substring(5));
    int off = 0, length, offset;
    String s;
    if (msg[8] == 1) {
    off = 18;
    byte z = 0;
    byte[] msg1 = {(byte)'N', (byte)'T', (byte)'L', (byte)'M', (byte)'S',
    (byte)'S', (byte)'P', z,
    (byte)2, z, z, z, z, z, z, z,
    (byte)40, z, z, z, (byte)1, (byte)130, z, z,
    z, (byte)2, (byte)2, (byte)2, z, z, z, z, //
    z, z, z, z, z, z, z, z};
    response.setStatus(response.SC_UNAUTHORIZED);
    response.setHeader("WWW-Authenticate", "NTLM "
    + new sun.misc.BASE64Encoder().encodeBuffer(msg1).trim());
    return;
         else if (msg[8] == 3) {
    off = 30;
    length = msg[off+9]*256 + msg[off+8];
    offset = msg[off+11]*256 + msg[off+10];
    s = new String(msg, offset, length);
    out.println(s + " ");
    else
    return;
    %></BODY>

    Please use Code tags
    Any of theses answer your question?
    Ohh, wait that code is a direct copy of the first two posts.
    What is wrong with it?

  • How do you stop the welcome to firefox 4 screen from coming up every time I open firefox? I get two tabs, one the welcome window, then my home page. How do you stop the bloody welcome screen?

    How do you stop the welcome to firefox 4 screen from coming up every time I open firefox? I get two tabs, one the welcome window, then my home page. How do you stop the bloody welcome screen?

    Its not my home page, Like I said, I hae my home page also come up in a different tab (google) I also get the welcome to FF4 on a seperate tab. My home page is set to google. But I dont want the welcome screen to pop up

  • When I do a search in my browser window I get redirected to a shopping page. It doesn't let me connect from the link in my search.

    For over a month now I can't get to links from my search. When I click on the link I get redirected to some shopping page. I can still use my bookmarks to get to my favorite sites but can't do searches without this dumb redirect highjacking me.

    Do a malware check with some malware scanning programs.<br />
    You need to scan with all programs because each program detects different malware.<br />
    Make sure that you update each program to get the latest version of their databases before doing a scan.<br />
    * http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    * http://www.superantispyware.com/ - SuperAntispyware
    * http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    * http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    * http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    See also:
    * "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked

  • Is there any way to get windows environment variables like %USERNAME% with javascript?

    is there any way to get windows environment variables like %USERNAME% with javascript using Adobe 10 pro?

    There is a fair amount of Acrobat JavaScript and Acrobat knowledge need to sort all of this out.
    The identity object holds a lot of sedative information. First, upon installation of Acrobat, only the login name is available in the identity object and the end user of the application needs to complete the "Name", "email" and "Organization Name" in the application's preferences. These are the only fields that are available to Acrobat JavaScript identity object as corporation, email, loginName, and name.
    Using the instructions in The Acrobat JavaScript Console (Your best friend for developing Acrobat JavaScript) you can run the following script in the JS console to see the items of the identity object:
    for(i in identity) {
    console.println(i +": " + identity[i]);
    and the following will appear in the console:
    loginName: georgeK
    name: George Kaiser
    corporation: Example
    email: [email protected]
    true
    The documentation states you need to use a trusted function to access this data, but you can access it at startup of Acrobat/Reader and add the properties of the identity object to an array:
    // application variable to hold the properties of the identity object
    var MyIdentity = new Array();
    // loop through the properties of the identity object
    for (i in identity) {
    // place each property of the identity object into an element of the same name in the Identity array
    MyIdentity[i] = identity[i];
    console.println(i +": " + MyIdentity[i])
    You access the items with:
    var loginUser = MyIdentity[loginName];  // get the loginName property
    In the user application level JavaScript file. See Acrobat Help / User JavaScript Changes for 10.1.1 (Acrobat | Reader) for the location of the application level folder you need to use.
    I would change the name of the array used in this post so an untrusted user cannot get to your data. Some of this data can be used in hacking into a user's system.

  • When I am using Firefox I keep getting unrequested Windows opening with full page advertisements. Why is this happening and how can I stop it?

    When I am using Firefox I keep getting unrequested Windows opening with full page advertisements. Why is this happening and how can I stop it? This is particularly aggravating when the new page has music or a voice message that intrudes even when I am not looking at the page.

    Do a malware check with some malware scanning programs on the Windows computer.<br />
    You need to scan with all programs because each program detects different malware.<br />
    Make sure that you update each program to get the latest version of their databases before doing a scan.<br /><br />
    *http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    *http://www.superantispyware.com/ - SuperAntispyware
    *http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    *http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    *http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    See also:
    *"Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked

  • How to get the windows username in jsx

    Hello,
    I have a JSX script in "My Documents\Adobe Scripts" to make it trusted script. I have another text file I need to read from JSX. Since the location depends on logged in user, I need to find the windows username. If anyone know how to get the windows username from jsx please reply.
    Thank you very much.
    Regards
    Nima.

    Hey,
    You can get username like this:
    var myUsername = $.getenv('username');
    You could also get My Documents folder like this:
    var myDocFolder = Folder.myDocuments;
    Hope that helps.
    Marijan (tomaxxi)
    http://tomaxxi.com/

  • Get logged on windows username

    Hi,
    I have a tomcat server running my webapps.
    And I need a way to retrieve the username of user(client) currently logged on(windows) .
    Any help will be great.
    Thanks

    this is all that you need copy the code and save it as a .jsp file
    <%@ page import="sun.misc.BASE64Encoder,java.util.regex.*" %>
    <p><h1>Network Windows USERNAME without any login (ie)</h1></p>
    <%
    String auth = request.getHeader("Authorization");
    if (auth == null) {
            response.setStatus(response.SC_UNAUTHORIZED);
            response.setHeader("WWW-Authenticate", "NTLM");
            return;
    if (auth.startsWith("NTLM ")) {
            byte[] msg = new sun.misc.BASE64Decoder().decodeBuffer(auth.substring(5));
            int off = 0, length, offset;
            String s;
            if (msg[8] == 1) {
                off = 18;
                byte z = 0;
                byte[] msg1 = {(byte)'N', (byte)'T', (byte)'L', (byte)'M', (byte)'S',
                                (byte)'S', (byte)'P', z,
                                (byte)2, z, z, z, z, z, z, z,
                                (byte)40, z, z, z, (byte)1, (byte)130, z, z,
                                z, (byte)2, (byte)2, (byte)2, z, z, z, z, //
                                z, z, z, z, z, z, z, z};
                response.setStatus(response.SC_UNAUTHORIZED);
                response.setHeader("WWW-Authenticate", "NTLM "
                      + new sun.misc.BASE64Encoder().encodeBuffer(msg1).trim());
                return;
            else if (msg[8] == 3) {
                    off = 30;
                    length = msg[off+17]*256 + msg[off+16];
                    offset = msg[off+19]*256 + msg[off+18];
                    s = new String(msg, offset, length);
                    //out.println(s + " ");
            else
                    return;
            length = msg[off+1]*256 + msg[off];
            offset = msg[off+3]*256 + msg[off+2];
            s = new String(msg, offset, length);
            //out.println(s + " ");
            length = msg[off+9]*256 + msg[off+8];
            offset = msg[off+11]*256 + msg[off+10];
            s = new String(msg, offset, length);
              Pattern pat = Pattern.compile("[a-z,A-Z,0-9]+");
              Matcher mat = pat.matcher(s);
              String s1 = "";
              while(mat.find())
                             System.out.println("Got name: "+mat.group());
                             s1 = s1+mat.group();
              System.out.println("Got name: "+s1);
              if(s.indexOf('.')!=-1)
                   System.out.println("dots!!!");
              s.replaceAll("[.]","");
              System.out.println("Got name again: "+s);
            out.println(s);
            out.println("Hello  <span style='position:relative; width:190;"
                + " height:10;filter:glow(Color=#009966,Strength=1)'>");
            out.println(s + "</SPAN>");
              out.println("<br><br><b>"+s+"</b>");
    %></BODY>

  • Windows username  from the client system

    hi guys,
    i want the username of the window .... to use it in my jsp page .. i want the code to run on the client machine ... plz help ...

    Try this link. Here u can find WSH and VB Script. Through this u get the username . That means u need to embed script code in JSP.
    I tried to get using JSP. but its vain. Try for more solutions. For time being i will check it.
    http://www.codeproject.com/vbscript/userinfo.asp
    Regards

  • Header not getting  displayed in the next page in the second table

    Dear Experts ,
    I have a query regarding Header not getting  displayed in the next page in the second table of the main window. .Let me elobrate the issue.
    I have a smartform in which there are  2 tables TABLE 1 and TABLE 2 in the smartform MAIN window. TABLE 1 is for pending PO and TABLE 2 is  for future delivery date P O separated by text in between.
    Now the header for both the tables and the data are getting displayed properly if the total output is in only one page. But If there are more entries in the TABLE 1 the Header for the TABLE 2 is not getting displayed. Header for TABLE 1 yet gets displayed properly in the next page in case of more entries.
    Only issue is that Header for TABLE 2 is not getting displayed in second page but it gets displayed if the entries are less in TABLE 1 and the total output is in one page .
    Please provide a elobrate solution on this problem as the requirement is urgent.
    Thanks,
    Regards,
    Sachin Hada

    Hi Sachin,
    you need to cteate two pages FIRST and NEXT.
    in first page --> FIRST
        next       --> NEXT
    in next page
      page---> NEXT
      next ---> NEXT.
    you copy the first page main window is the same in next page
    aslo
    I think help ful for you
    thanks & Regards
    BHUPAL.

  • Open discoverer report in new browser window and without connections page

    Hi All,
    We are using Oracle 11g Discoverer 11.1.1.4.  Requirement is to open the discoverer report in a new browser window and without connections page.
    When we are running discoverer reports with this parameters we unwantedly get the connections page of the discoverer plus which we don't want.
    Went through the documentation given in this page and followed it still the issue persists, and i see couple of threads with my issue and no updates.
    This excerpt is from the documentation available in the link
    " _plus_popup=true and framedisplaystyle=embedded launches Discoverer Plus in a new pop-up browser window that contains the Plus applet embedded in it "
    http://www.art2dec.com/documentation/docs/oas10g1012/linux/bi.1012/b13918/urlstart.htm
    and Here is what we use to invoke our reports.
    http://ipaddress:port/discoverer/plus?cn=cf_123&_plus_popup=TRUE&framedisplaystyle=EMBEDDED&wb=disc_wb_1
    Request the forum users from PRO discoverer group to help me out of this issue and expect a good discussion on this.
    Thanks in advance

    Closing the thread
    We were able to achieve by changing the browser settings in the IE 8 Browser. Disabled Tabbed browsing.

Maybe you are looking for

  • My Power Mac G4 MDD has no DVD drive how do I pair it install OS X on my new HD.

    My Power Mac G4 MDD has no DVD drive how do I pair it install OS X on my new HD.

  • HT4623 how to downgreade ios 6 to ios 5?

    after upgreade to ios 6 facing internet slow and cannot load problem, please help solve this problem.how to downgreade ios 6 to ios 5?

  • Resonance peaks in frequency vs. amplitude spectrum

    Hello all, I am struggling to find a way to analyze some data.  My data is frequency vs. amplitude spectrum plot.  There are resonance peaks in the spectrum.  When the data is clean I use peak detection to measure the frequency spacing of the peaks (

  • Sap B1 details

    1.In my company bought sap B1.so i interest to learn B1.so how to use sap B1 in textile industry if anyone know tell me brief other wise pp module details please. 2. Anyone give me a material details in pdf  for sap B1 any one of the complete module

  • FCE is capturing audio out of synch

    I just captured some footage from my Sony V1 camera onto Final Cut Express. At the end of the capture session a sign came up saying the following: "The audio sample rate of one or more of your captured media files does not match the sample rate on yo