Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet invisible

 
vivek sivakumar
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello i want to get the username from the client (username>> the name which he uses to enter into his system -PC) this is possible with java by using System.getProperty("user.name") , my idea is to run a invisible applet for i second to get the usename and then a bean should receive this value and update it on a html file !!!pooooooooffff is this possible or does my idea sound sensible???
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two big problems...

  • Most web browsers won't run "invisible" applets...
  • If you try to call System.getProperty( "user.name" ); it will throw a AccessControlException in the SecurityManager...


  • A program such as this is the reason all these security measures were built into Java... it would be a "bad idea" to have an applet on a webpage harvesting peoples login ids...

    -Nate
 
vivek sivakumar
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya correct the applet itself is giving me the exception !!!
well i posted this question because i have a web pag which can authenticate the user with user name and pass word but the reason why i needed it was that i wanted to avoid the problem of login (typing username) each and everytime when a user enters my login page so if i could retrieve his username then he can be automatically authenticated to get in avoiding the login process!might be i can set a cookie to get the username but what if other person comes who uses the same system , he gets the username thats a FOWL!! so i thought of getting the username!!!
 
Tim Holloway
Saloon Keeper
Posts: 18362
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depending on your OS, you may not have quite the problem you think. Many OS's keep a separate cookie jar (no relation to a java JAR ) for each login.
Of course, you still have to make sure that the user has logged into the LAN properly and didn't just sit down and start working with a machine someone else had logged into. But that's not a technical problem!
 
vivek sivakumar
Ranch Hand
Posts: 187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok for now i restrict myself to get only the username of windows OS !!! then u think its possible?? pls give some ideas!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic