• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Login Window in Html page Apache style

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hello Java Ranchers,

How to generate A Login window of the format
------------------------------------------------------
Enter Network Password
Please type your user name and password
Site :
Realm :
User Name _________
Password _________
ok cancel
-----------------------------------------------------
I want a Login window like the above which seems to be seperated from the web page
What is the required JSP/ HTML code for this
In many new sites we see this type of Login window mostly apacehe sites
form
George Joseph
 
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is called Basic Authentication and depends on what HTTP server you are using for how to set it.
Some HTTP servers simply have the requirement of placing a special file (eg .htaccess) in a directory you want to protect. The file contains a list of valid users, and when the browser tries to access anything in that directory they are asked to authenticate.
You would really need to look up the Apache manual for how to set this.
Another approach from JSP/Servlets and to modify the HTTP headers sent back to the browser specifying that Basic Authentication is required.
But easiest is just let the HTTP server worry about it.
James.
 
James Swan
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is an example of a Servlet performing Basic Authentication:

James
[This message has been edited by james swan (edited November 06, 2001).]
 
George Joseph
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi James,
Thanks for your prompt and valuable response
regards
George Joseph

Originally posted by james swan:
[B]Here is an example of a Servlet performing Basic Authentication:

James
[This message has been edited by james swan (edited November 06, 2001).][/B]


 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I put the Servlet below but, when I make the call from a from, send me:
HTTP Status 405 - The specified HTTP method is not allowed for the requested resource
type Status report
description The specified HTTP method is not allowed for the requested resource

How can I test this Servlets
 
That new kid is a freak. Show him this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic