Re: how ssl can be used to transfer login data?
Niall Gallagher <[email protected]>
| Newsgroups | gmane.comp.java.sun.servlet |
|---|---|
| Message-ID | <[email protected]> |
>hello
>
>can you tell me how to use ssl to send some important data from web page to
>servlet?
Hi
You must challange the browser so that it is forced to use Basic Authentication, which is TOTALLY secure over SSL. So somthing like
response.setHeader("WWW-Authenticate", "Basic realm=My-Realm");
To parse the resulting Authorization header you should use the PrincipalParser which can be found at
http://simpleweb.sourceforge.net/java2html/simple/util/parse/PrincipalParser.java.html
This will parse the result of request.getHeader("Authorization"). You can find an example of this use at.
http://simpleweb.sourceforge.net/demo/GatewayService.java
Hope this helps
Niall
___________________________________________________________________________
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html