Introduction
Most commercial Web sites to provide site authentication features to protect certain limited resources, HTTP protocol specification for J2EE and Web site of the certification process has been exhaustive definition, common browser interface can provide help in the form of a corresponding user through the certification process sites according to respective protocols. However, in some cases, we need to write programs direct access to a protected resource sites, in such cases, you can not use the browser interface to complete a given certification, and we need to send the appropriate request manually according to different protocols to complete the certification process. This paper presents a solution based on Apache HttpClient application packet according to this demand.
Introduction
J2EE-site certification Introduction
For security reasons require user authorization and management of common J2EE site will join the authentication / authorization mechanism for a particular resource. For example, a public Internet forum, open to only a specific user RSS or Atom Feed, these resources must be open to visitors when the user is authorized to be sure visitors. In order to achieve this functionality, J2EE sites often use some kind of site authentication mechanisms, which are common HTTP Basic Authentication and J2EE Form-Based Authentication.
HTTP Basic authentication certification standard HTTP authentication protocol (RFC2617) defined above. When a client makes a request to the requirements of HTTP Basic authentication server client to access a protected resource, requires the client to upload user name and password pairs. After the server receives a username / password and verified, it will protect the resource content is returned to the client