Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to create a login screen on the client computer?  RSS feed

 
Stephen Wei
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I want to do is:
When the client access a page on the server using IE browser, first the servlet will create a pop up Login Window on the client screen, which asks for UserID and password, then the servelt will validate this id, if ok, forwards the initial html page to the client.
This is very common for many sites, but I do not know exactly how to do this, do I use Servlet to start a Javascript application on the client side?
Please help, thanks.

------------------
Sun Certified Programmer for Java Platform
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like Basic Authentication, which can be implemented quite easily on *nix machines using htaccess. There may be other ways to do it but this is the way I've done it previously. The next step up (as far as I'm aware) is Form Based Authentication since Basic is supposed to be quite weak.
Dave.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is built-in security in Tomcat4.0. Investigate the security settings in web.xml

Also, if you deploy your WAR file to a J2EE app server, you can specify in the deploy descriptors the security you want, and the app server will throw a login dialog box when access is attempted on secured resources.
 
Stephen Wei
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the above 2 replies. I am using Turbo Linux 6.0 server, Apache 3.12, Tomcat 3.x. So do I use the build in securities provided by the system right? Is there anyway I can customize the login screen then?
I am only a junior, Thanks.
------------------
Sun Certified Programmer for Java Platform
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!