You want to connect to Amazon Web Services (AWS) with a servlet or JSP.
Download the Amazon Web Services SDK, acquire an Amazon developer's token, and create a Java-SOAP package for interacting with AWS.
The process for setting up AWS goes like this:
Download the AWS SDK at http://www.amazon.com/gp/aws/download_sdk.html/002-2688331-0628046. This kit.zip file includes several code samples and web services API documentation in HTML format.
Acquire a developer's token from: http://associates.amazon.com/exec/panama/associates/join/developer/application.html/002-2688331-0628046. Similar to the license key you use with Google's Web APIs, the free-of-charge token comprises a series of encoded characters that must accompany each interaction between your Java code and AWS.
Develop the Java API for making SOAP requests to AWS. The end result is a JAR file containing the classes that your servlets or JSPs use to make SOAP requests. The rest of this recipe describes how to generate this JAR file, because it is a multistep process.
Interacting with AWS using SOAP messages is one option that Amazon makes available to developers. Another one involves encoding the web services requests in URLs, and thereby making AWS requests via HTTP (called "XML over HTTP"). Recipe 27-7 shows an example of this URL search (they are useful for debugging your SOAP applications). If you store an XSLT file on the Web, AWS uses this file to ...