File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Login Window in Html page Apache style

 
George Joseph
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
James Swan
Ranch Hand
Posts: 403
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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]

 
Pedro Garcia
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic