
–The HTTP Post method of the servlet references the CustomerXML class, as shown in Example
Example 10-4 Source code for the servlet doPost method
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
CustomerXML xml = getCustomerXML(); xml.setMembership(new java.lang.Long(
request.getParameter("membership"))); xml.setFirstname(new java.lang.String(
request.getParameter("firstName"))); xml.setLastname(new java.lang.String(
request.getParameter("lastName"))); xml.setEmail(new java.lang.String(
request.getParameter("email"))); showPage(resultStylesheet, response);
}
XSL Files: By expanding the folder /Web
Customer.xsl is the style sheet for the customer registration form. Note the following:
–The stylesheet code in Example
Example
<xsl:template match="/"> <html>
<head>
<title>Customer Registration Form</title> <style type="text/css">
<![CDATA[ body
{
}
h1
{
color: #0000ff;