Accepting Payment Information
At this point, we have a page that shows the user his or her order and allows the input of payment information. All that's left is for us to create a servlet to take in that information, and Listing 6.40 is that servlet.
Listing 6.40. CompleteOrder.java: Saving Payment Information
0: import java.io.*; 1: import javax.servlet.*; 2: import javax.servlet.http.*; 3: import org.apache.xerces.parsers.DOMParser; 4: import org.w3c.dom.Document; 4a:import org.w3c.dom.Node; 4b:import org.w3c.dom.NamedNodeMap; 4c:import org.w3c.dom.NodeList; 5: import org.apache.xml.serialize.XMLSerializer; 6: import org.apache.xml.serialize.OutputFormat; 7: 8:public class CompleteOrder extends HttpServlet { 9: 10: //********* BEGIN doGet() ... |
Get XML and Java™ from scratch now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.