Getting username from an applet

I'm writing a program (an applet) that needs to get the username from a windows 2000 platform. Is that possible? I guess I need to set a security policy-file... Can someone leed me on the right way?

It would be possible in an application to just do this:
String userName = System.getProperty("user.name");But for security reasons it can't be done like this in an applet.
Some info about signing applets from here:
http://forum.java.sun.com/thread.jsp?forum=63&thread=152882
And if that doesn't help, you can search for some more resources at the forums and java.sun.com

Similar Messages

  • How to get username from customer email id.

    Hi experts,
    How to get username from customer email id.I am using transaction XD02.
    I would be thankful for your kind replies .
    Regards,
    Sachin Hada

    Hi sachin,
    Re: Email id field
    Regards,
    Sravanthi

  • Getting notifications from nm-applet

    Hey
    Is there any way to get notifications from nm-applet WITHOUT running a full DE and WITHOUT running a system-tray?
    archboy

    archboy wrote:WITHOUT running a system-tray?
    wiki wrote:In order to run nm-applet without a systray, you can use trayer or stalonetray.
    You also need a notification daemon that listens for notifications and displays them. I use "dunst" for this, it is fairly lightweight.
    Don't forget to enable the notifications in nm-applet, which is done by right clicking on the nm-applet icon. That means you have to run a system-tray at least once to be able to activate the notifications.

  • Error in getting Username from UserPrincipal in WSRP Producer

    Hi,
    In WSRP Producer,we are trying to get the the username from the UserPrincipal which was sent by the consumer.
    String userID = this.getRequest().getUserPrincipal().getName();
    I'm getting an Null pointer exception in one of the Producer but the same kind of code is working in other producer.
    The two producers are in different domains. And the Consumer is same for the both Producers.
    Could anybody help me to find out what went wrong. ?
    Thanks,
    Mohan

    Hello,
    It is likely that your two producers are configured differently for security (SAML). For the producer that isn't working, it is likely that you just need the proper entries in your key store to get it to work. Look at the key store for the producer that is working, and try to ensure the other producer is similarly configured.
    Kevin

  • Get username from session and retrieve records from database wit tat userna

    hello..
    i got a ChangePassword.jsp which i retrieve the username from session using bean to display on e page..
    <jsp:getProperty name="UsernamePassword" property = "username"/>
    but in my servlet, i wan to retrieve records from database with tat username..
    i tot of coding
    String username = (String)request.getSession().getAttribute("UsernamePassword");
    and then use tat username to retrieve records.. but is that e right way? The page did not display and i got a CastingException..
    Please help.

    If you are using the session inside a jsp, you can say "session" without having to declare it.String usernamePassword = (String) session.getAttribute("usernamePassword");However, right after you get this value, check if it is null:
    if(usernamePassword==null)
    // do sth like forward to error page
    else
    // continue processing
    If it is null, then you are probably not setting it right in the first place. Make sure that in your servlet A you create a session, and before you return or forward to a jsp, that you actually set this value in the session like saying
    session.setAttribute("usernamePassword", usernamePassword);
    and it is case sensitive for the key.

  • Security - Hackers Getting Usernames from Open Directory

    Hello,
    My logs indicate that someone from an outside IP has been trying to log-in to our MacOS X Server using AFP and SMB protocols. It appears they already know what usernames to try but they do not know the passwords. They even know about "test" accounts that were created, used temporarily and then set to "disabled" using Workgroup Manager.
    My question is: How did they learn which usernames? The server was just setup yesterday and the 10 users were added less than 24hrs ago.
    There was a period of a couple hours tonight where the built-in MacOS X Server firewall was stopped because other network routing parameters were being configured. Is there a way that someone can request a list of all usernames from the Open Directory without having to authenticate to it first?
    Port 625 is 'Remote Directory Access' - Could someone connect to that port and ask for a list of all users?
    Any theories would be appreciated. Firewall has since been re-enabled and the logs have gone mute again.

    If you're using an Open Directory master, the directory is a public resource. The LDAP port is 389. If you do not need outside access, you can block that port. That said, usernames are generally not considered a security feature. Users need to have strong passwords. I recommend using the policy settings to require users to pick passwords that will not be in hacker dictionaries. Go to Server Admin -> Open Directory -> Settings -> Policy. A reasonable first bid for security is to choose, "differ from account name," the following two for require a letter and a number, and passwords should contain at least 6 characters.

  • How to get username from Form-based login

    I am using form-based login in my web.xml file.
    When I attempt to access a protected .jsp page, I get sent to my login page as expected.
    When I enter my username/password successfully it forwards me to the .jsp page I was trying to go to, as expected.
    From that .jsp page, how do I get the username/password info from the login form? I looked at the session attributes, request attributes, and request parameters, but I don't see anything. Does the form-based authentication remove these variables?
    I need the username that is filled out in the login form, so that I can do custom work with it. I cannot ask the user for it again after they login, as that is inefficient and sloppy.

    Found it.
    request.getUserPrincipal().getName()

  • How to get username from AssignedTo item using Powershell with CSOM?

    Hi all:
    I have a Powershel script with CSOM to extract some information from a list in SP2010, however I can’t get the user name associated to the field ‘AssignedTo’. It seems that in order to extract information from this field you need to use ‘Microsoft.SharePoint.Client.FieldLookupValue’
    however I don’t know how to do that with Powershell.
    Thank you very much for your help
    Regards

    Hi Jaydeep:
    The sentence "New-Object Microsoft.SharePoint.SPFieldUserValue" failed, however, I just added this to get the User Name:
    $item["AssignedTo"].lookupvalue
    I don't know if it is the best solution but it shows the UserName.
    Thank you very much
    Regards
    Carlos Negroni

  • How to get username from audible account if one is associated with the store account

    So, I noticed, while de-authorizing a previous computer of an itunes store account, that an audible account was available for deauthorization as well.  I never authorized an audible account, and I'm not getting any help from apple about retaining a username if you never created one.  shady

    Have you ever had an account with audible.com ? If not then you won't have one to deauthorise - the option to deauthorise one shows in the Advanced menu on my iTunes, even though I haven't currently got one authorised on it. If you have got an audible account and you have authorised it on that computer then Apple won't know what it is, as the account would be with audible.com, not Apple.

  • Get ClassNotFoundException from a applet

    hi all,
    i'm trying to use the java.awt.geom.Arc2D class in a applet. it works fine on a appletviewer, but it throws the ClassNotFoundException:java.awt.geom.Arc2D on a applet in IE5.
    i'm sure it got the lastest Java plug-in 1.3.1 on my computer.
    here is the code of my simple applet:
    import java.awt.*;
    import java.applet.*;
    import java.awt.geom.Arc2D;
    public class Arc extends Applet {
         private Arc2D a2d;
         public void init() {
                   a2d = new Arc2D.Double(Arc2D.PIE);
         public void paint(Graphics g) {
              g.drawString("Welcome to Java!!", 50, 60 );
    }i can't even get the String drew on the applet as it's thrown the exception when i try to new the new Arc2D.Double object. can anyone pls tell me what else do i need to run this applet on IE5?
    many thanks!
    Darshaan.

    I don't think that'll invoke the Java plug-in correctly.
    Try something like the following to make sure your browser uses the plug-in instead:
    <OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="500" height="300" align="baseline" codebase="http://you.company.com">
    <PARAM NAME="code" VALUE="Arc.class">
    <PARAM NAME="codebase" VALUE="java/src">
    <PARAM NAME="scriptable" VALUE="true">
    No Java 2 SDK, Standard Edition v 1.3 support for APPLET!!
    </OBJECT>
    You can find more about how to write HTML for Java plug-in here:
    http://java.sun.com/products/plugin/1.3/docs/tags.html
    Hope this helps!

  • How does javascript get string from applet?

    hi, sir/madam:
    I use an applet to deal with simulation, make the results to be a string and want to save it in a text file. Certainly, using applet to write local file is not good method (though I have some idea about it). I want that javaScript write something in browser and I save it with my mouse (manual) as a text file.
    thank for your help.
    xn
    could javaScript write/read local file?

    There is a nice JavaScript forum that you can visit if you have tough JavaScript questions:
    http://forums.webdeveloper.com/forumdisplay.php?s=a23bf83c088c66ac3adde0c3c5616bae&forumid=3
    I'm not implying that ppl here don't know JavaScript or anything like that.....
    In answering your questions, a Java applet can read from and write to local disk if proper permissions are granted either via a signed applet or setting the Java access right. Signing an applet can be a royal pain in the butt because you have to sign it one way for IE, another way for NN4, and yet another way if you use a plugin, etc....but here is a link in case you're interested:
    http://developer.java.sun.com/developer/qow/archive/167/index.jsp
    A JavaScript definitely cannot read from or write to a local disk unless you get help from something like MS ASP or VB scripts. The only reason you were able to read thru the appletviewer is because it's not a true browser and it's written by Sun to work with their own product.
    As far as using javascript to get information from an applet, you can try to make your applet scriptable via Netscape JSObject. I know for sure it works with IE and NN4+ but last time I tried, Sun and Netscape were still having trouble getting LiveConnect to work properly with NN6+.
    And there you have it.
    ;o)
    V.V.

  • How to get username in the application?

    Hi,
    Do anyone knows how to get username from the application, for example, oracle provides a function to retreive a username from application?
    Please Help
    Amy

    read about the following function, it is usefull for you.
    sys_context

  • Username from userid

    Hi,
    How can we get Username from userid...
    Foe eg: userid : xyz01
                username : Dhananjay Patil.
    Pls help.

    Hi Dhananjay,
    Use <b>BAPI_USER_GET_DETAIL</b> function module to get the user name for an user id.
    Give your user id to this function module and you will get your name and details in ADDRESS parameter.
    Thanks,
    Vinay

  • Get Username

    How to get username from Client Machine in java
    More Specific
    My Jsp Files in a Server .when Client Acces Jsp Page his username should be displayed.(username:- System Username while loggging in)

    request.getRemoteUser() returns the user ID that was used to authenticate the user to your web server. If you were expecting to get the user name that I used to sign on to my computer when I come to your web server, no.

  • Getting the username from a portlet

    Hi,
    I have a new installation of Portal 10.1.4 and I'm trying to write a portlet that has access to the username from within a JSP. I am trying renderRequest.getRemoteUser() and renderRequest.getUserPrincipal().getName() and both return the username with brackets and a number inside, for example "MCOARR[1]". What I really want is the uid from LDAP.
    Looking in the directory server my user is mcoarr (or more specifically, both the uid and cn attributes are set to "mcoarr").
    How do I get just the username?
    Thanks,
    Matt

    Yeah, I had to do that too (the text munging stuff). Unfortunately, Oracle Portal doesn't seem to be following the WSRP spec on getting user attributes. There is a whole section in the spec about how to map user attributes in your portlet.xml and then get them in a portlet by doing stuff like:
    Map userInfo = (Map) request.getAttribute(PortletRequest.USER_INFO);
    String givenName = (userInfo!=null) ? (String) userInfo.get(“user.name.given”) : “”;
    String lastName = (userInfo!=null) ? (String) userInfo.get(“user.name.family”) : “”;
    This is how it works in uPortal, Liferay and other portals we tried. I don't know why Oracle portal has been through two revs of WSRP support and hasn't got this right yet.
    -Mike

Maybe you are looking for