
XMLUtil.transform(getDocument(),
merchant.getProductXSL(),
response.getWriter(),
response.getCharacterEncoding());
}
/**
* return the time the data was last modified
*/
public long getLastModified()
{
return merchant.getLastModified();
}
}
Checkout
Listing 12.12 handles requests to check out of the shop, which is used for
purchases. Checkout collects information about the buyer and creates an
order in XML. The order is either saved as a local file or posted to the mer-
chant Web server. Posting to a remote site is done through HTTPPost,
defined in Listing 12.13.
Listing 12.12: Checkout.java
package com.psol.xcommerce;
import java.io.*;
import java.text.*;
import ...