-- The complete, example-driven tutorial and reference covering all of today's leading technologies and solutions for e-Commerce development.-- Covers Java, JavaScript, JDBC, SQL, XML, servlets, security, and much more.-- Includes CD-ROM with extensive Java, JavaScript and SQL e-Commerce code examples.Today's e-Commerce-enabled Web sites are more complex than ever: it's no longer enough to simply add "shopping cart" functionality This book shows developers exactly how to integrate a wide range of proven and emerging Web technologies to build a state-of-the-art e-Commerce site from scratch. The authors' example-driven, step-by-step approach offers an inside view of e-Commerce systems -- and provides Java, JavaScript, SQL and XML code that can help developers dramatically reduce time-to-market. Developing e-Commerce Sites starts with a quick refresher on the basics of establishing a Web presence, and a detailed overview of the key challenges associated with deploying e-Commerce and other sophisticated Web applications. Next, the authors introduce several of the key technologies that enable e-Commerce, including HTML, Java, servlets, JavaScript, JDBC, and XML -- providing detailed examples that solve real-world e-Commerce problems. Next, Developing e-Commerce Sites addresses the critical security, credit card verification, and site performance issues associated with e-Commerce. The book concludes by walking through the development of a complete e-Commerce system from start-to-finish, including database integration, user interfaces, and the creation of utility classes that can be reused in any e-Commerce deployment -- and are also provided on CD-ROM. Cover......Page 1 Contents......Page 10 Rationale......Page 18 Highlights of the Book......Page 19 Acknowledgments......Page 20 Feedback......Page 21 Part: I......Page 22 Chapter 1 The Basics of Internet Technology......Page 24 Web Sites and Browsers......Page 25 Web Pages and HTML......Page 26 URLs......Page 28 FORMS and CGI......Page 29 Javascript......Page 31 Cookies......Page 33 Java and Servlets......Page 34 JDBC......Page 35 Inventory Management Systems......Page 36 Profile Management Systems......Page 37 Ordering Management Systems......Page 38 Getting on the Internet......Page 40 Disclaimer......Page 42 Part: II......Page 44 Introduction......Page 46 First HTML File......Page 47 Some Formatting Tags......Page 48 Links......Page 50 Lists......Page 52 Tables......Page 53 Frames......Page 54 Forms......Page 58 Conclusion......Page 62 Introduction......Page 64 Object Oriented Programming......Page 65 First Java Program......Page 66 Applets and Applications......Page 68 Instances......Page 69 Method Overloading......Page 71 Inheritance......Page 72 Interfaces......Page 75 Packages......Page 77 Exceptions......Page 79 File I/O......Page 81 Threads......Page 82 Some Useful Classes and Methods......Page 86 Object Serialization......Page 89 Remote Method Invocation (RMI)......Page 92 Reading a URL......Page 98 Internationalization......Page 99 Applets......Page 102 Threads in Applets......Page 105 Java Mail API......Page 109 Some Useful Tools......Page 111 Some Practical Examples......Page 112 Some Handy Classes and Methods in Some Useful Packages......Page 124 HTML FORMs......Page 128 POST and GET METHODs......Page 129 Anatomy of a Request and a Response......Page 130 Drawbacks of CGI......Page 131 Efficiency with Servlets......Page 132 JServ—Servlet Engine......Page 133 A Basic Servlet......Page 135 FORM Variables......Page 137 Cookies......Page 139 Sessions......Page 144 Some Practical Examples......Page 147 Example: Session-Based Shopping Cart......Page 162 Some Useful Interfaces/Classes and Some of Their Methods......Page 170 Introduction......Page 174 Statements......Page 175 Functions......Page 176 Objects in Javascript......Page 177 Events and Event Handling......Page 179 Arrays......Page 180 FORMs......Page 181 Select Lists......Page 182 Submit and Radio Buttons......Page 183 Checkboxes......Page 185 Frames......Page 186 Cookies......Page 188 A Practical Example......Page 191 Some Useful Methods, Properties, and Event Handlers of Some Useful Objects......Page 203 Reference......Page 205 Chapter 6 SQL and JDBC......Page 206 Schemas......Page 207 Table Creation......Page 208 Column Constraints......Page 209 Keys......Page 210 Data Insertion and Modification......Page 211 Data Retrieval......Page 213 Operators......Page 214 Retrieving Records from Multiple Tables......Page 215 Sequences......Page 216 Stored Procedures......Page 217 Connecting to the Database......Page 219 Connection Object......Page 220 Retrieving Data......Page 221 PreparedStatement......Page 224 Insert into a LONG Column......Page 227 CallableStatement......Page 229 Transactions in JDBC......Page 231 Some Practical Examples......Page 234 Some Useful Classes and Interfaces in the Java.sql Package......Page 243 Introduction......Page 246 Data Interchange with an XML Document......Page 248 Document Type Definitions (DTDs)......Page 250 Client-Side Usage......Page 251 Server-Side Usage......Page 253 Some Practical Examples......Page 255 References......Page 268 PART: III......Page 270 Chapter 8 Credit Card Verification......Page 272 Card Authorization URLs......Page 273 Third-Party APIs......Page 276 Security......Page 278 Some Hints on Making the Applications Secure......Page 284 Performance......Page 286 PART: IV......Page 290 Inventory Management System......Page 292 Profile Management System......Page 297 Ordering Management System......Page 299 Conclusion......Page 302 Inventory Management System......Page 304 Ordering System......Page 311 Profile Management System......Page 320 Shipping Management System......Page 325 Reporting System......Page 327 Description of the Utilities......Page 332 Connection-Pooling Utility......Page 333 Authenticator......Page 337 Email-Sending Utility......Page 339 HTML Template Utility......Page 340 High-Level Description......Page 344 Detailed Description......Page 348 HTML Files in Document Root......Page 361 Other HTML Files and Templates......Page 363 High-Level Description......Page 366 Detailed Description......Page 369 Document Root HTML Files......Page 378 Other HTML Files and Templates......Page 380 High-Level Description......Page 382 Detailed Description......Page 387 Document Root HTML Files......Page 399 Other HTML Files and Templates......Page 406 PART: V......Page 408 High-Level Description......Page 410 Detailed Description......Page 412 Other HTML Files and Templates......Page 416 High-Level Description......Page 418 Detailed Description......Page 421 Other HTML Files and Templates......Page 427 Installation......Page 430 Troubleshooting......Page 431 Configuration......Page 432 Installation......Page 433 Configuration......Page 435 Utilities......Page 437 Troubleshooting......Page 438 Utilities......Page 439 JavaMail......Page 440 Installation......Page 442 Inventory Management System......Page 448 Ordering Management System......Page 493 Profile Management System......Page 536 Shipping Management System......Page 578 Reporting System......Page 594 Utilities......Page 620 SQL For Creating Tables and Sequences......Page 625 B......Page 628 D......Page 629 F......Page 630 H......Page 631 J......Page 632 O......Page 633 P......Page 634 S......Page 635 T......Page 637 X......Page 638 Cover 1 Contents 10 Introduction 18 Rationale 18 Target Audience 19 Highlights of the Book 19 Organization 20 Acknowledgments 20 Feedback 21 Part: I 22 Chapter 1 The Basics of Internet Technology 24 Skill Level Required 25 Web Sites and Browsers 25 Web Pages and HTML 26 Web Servers and HTTP 28 URLs 28 FORMS and CGI 29 Javascript 31 Cookies 33 Java and Servlets 34 Databases 35 JDBC 35 XML 36 e-Commerce Systems 36 Inventory Management Systems 36 Profile Management Systems 37 Ordering Management Systems 38 Shipping Management Systems 40 Reporting Systems 40 Getting on the Internet 40 Disclaimer 42 Part: II 44 Chapter 2 HTML 46 Introduction 46 First HTML File 47 Some Formatting Tags 48 Links 50 Lists 52 Tables 53 Frames 54 Forms 58 Putting Comments in HTML 62 Conclusion 62 Chapter 3 Java 64 Introduction 64 Object Oriented Programming 65 First Java Program 66 Applets and Applications 68 Instances 69 Method Overloading 71 Inheritance 72 Interfaces 75 Packages 77 Exceptions 79 File I/O 81 Threads 82 Some Useful Classes and Methods 86 Object Serialization 89 Remote Method Invocation (RMI) 92 Reading a URL 98 Working with Proxies 99 Internationalization 99 Applets 102 Threads in Applets 105 Java Mail API 109 Commenting Code in Java 111 Some Useful Tools 111 Some Practical Examples 112 Conclusion 124 Some Handy Classes and Methods in Some Useful Packages 124 Chapter 4 Servlets 128 HTML FORMs 128 POST and GET METHODs 129 Anatomy of a Request and a Response 130 CGI Scripts 131 Drawbacks of CGI 131 Efficiency with Servlets 132 Anatomy of a Servlet 133 JServ—Servlet Engine 133 A Basic Servlet 135 FORM Variables 137 Cookies 139 Sessions 144 Some Practical Examples 147 Example: Session-Based Shopping Cart 162 Conclusion 170 Some Useful Interfaces/Classes and Some of Their Methods 170 Chapter 5 Javascript 174 Introduction 174 Documents 175 Statements 175 Examples 176 Functions 176 Objects in Javascript 177 Events and Event Handling 179 Arrays 180 FORMs 181 Select Lists 182 Buttons 183 Submit and Radio Buttons 183 Checkboxes 185 Text Fields and Text Areas 186 Frames 186 Cookies 188 A Practical Example 191 Some Useful Methods, Properties, and Event Handlers of Some Useful Objects 203 Reference 205 Chapter 6 SQL and JDBC 206 Databases and SQL 207 Schemas 207 Datatypes 208 Table Creation 208 Column Constraints 209 Keys 210 Indexes 211 Dropping Tables 211 Data Insertion and Modification 211 Transactions 213 Data Retrieval 213 Operators 214 Functions 215 Retrieving Records from Multiple Tables 215 Deleting Records 216 Sequences 216 Stored Procedures 217 JDBC 219 Connecting to the Database 219 Drivers 220 Connection Object 220 Statement Object 221 Retrieving Data 221 Inserting /Modifying Data 224 PreparedStatement 224 Insert into a LONG Column 227 CallableStatement 229 Transactions in JDBC 231 Some Practical Examples 234 Some Useful Classes and Interfaces in the Java.sql Package 243 Chapter 7 XML 246 Introduction 246 Some Rules to Follow 248 Displaying an XML Document 248 Data Interchange with an XML Document 248 Document Type Definitions (DTDs) 250 Parsers 251 Using XML 251 Client-Side Usage 251 Server-Side Usage 253 Some Practical Examples 255 Conclusion 268 References 268 PART: III 270 Chapter 8 Credit Card Verification 272 Card Authorization URLs 273 Third-Party APIs 276 Chapter 9 Security and Performance 278 Security 278 Password Security 284 Some Hints on Making the Applications Secure 284 Performance 286 PART: IV 290 Chapter 10 System Design 292 Introduction 292 Inventory Management System 292 Profile Management System 297 Ordering Management System 299 Other Systems 302 Conclusion 302 Chapter 11 Functionality 304 Introduction 304 Inventory Management System 304 Typical Usage Scenario 311 Ordering System 311 Typical Usage Scenario 320 Profile Management System 320 Shipping Management System 325 Reporting System 327 Chapter 12 Utilities 332 Introduction 332 Description of the Utilities 332 Connection-Pooling Utility 333 Authenticator 337 Email-Sending Utility 339 HTML Template Utility 340 Chapter 13 Inventory Management System 344 Prerequisites 344 High-Level Description 344 Detailed Description 348 HTML Files in Document Root 361 Other HTML Files and Templates 363 Chapter 14 Profile Management System 366 High-Level Description 366 Detailed Description 369 Document Root HTML Files 378 Other HTML Files and Templates 380 Chapter 15 Ordering Management System 382 High-Level Description 382 Detailed Description 387 Document Root HTML Files 399 Other HTML Files and Templates 406 PART: V 408 Chapter 16 Shipping Management System 410 High-Level Description 410 Detailed Description 412 Document Root HTML Files 416 Other HTML Files and Templates 416 Chapter 17 Reporting System 418 High-Level Description 418 Detailed Description 421 Document Root HTML Files 427 Other HTML Files and Templates 427 Appendix A: Installation and Configuration Instructions 430 Apache 430 Installation 430 Troubleshooting 431 Configuration 432 JServ 433 Installation 433 Configuration 435 Oracle 437 Utilities 437 mSQL 438 Troubleshooting 438 Utilities 439 JDBC Drivers 440 Troubleshooting 440 JavaMail 440 Appendix B: Complete Code Listing 442 Installation 442 Inventory Management System 448 Ordering Management System 493 Profile Management System 536 Shipping Management System 578 Reporting System 594 Utilities 620 SQL For Creating Tables and Sequences 625 Index 628 A 628 B 628 C 629 D 629 E 630 F 630 G 631 H 631 I 632 J 632 K 633 L 633 M 633 N 633 O 633 P 634 Q 635 R 635 S 635 T 637 U 638 V 638 W 638 X 638 Cd-rom Contains: Code Examples -- Complete Code For The Five Systems Described. Rationale -- Target Audience -- Highlights Of The Book -- Organization -- The Basics Of Internet Technology -- Skill Level Required -- Web Sites And Browsers -- Web Pages And Html -- Web Servers And Http -- Urls -- Forms And Cgi -- Javascript -- Cookies -- Java And Servlets -- Databases -- Jdbc -- Xml -- E-commerce Systems -- Inventory Management Systems -- Profile Management Systems -- Ordering Management Systems -- Shipping Management Systems -- Reporting Systems -- Getting On The Internet -- Using An Isp -- Using A Hosting Service -- Keeping The Computer With You -- A Note About Speed -- Html -- First Html File -- Some Formatting Tags -- Links -- Lists -- Frames -- Forms -- Putting Comments In Html -- Java -- Object Oriented Programming -- First Java Program -- Applets And Applications -- Instances -- Method Overloading -- Inheritance -- Interfaces -- Packages -- Exceptions -- File I/o -- Threads -- Some Useful Classes And Methods -- Vectors -- Hashtables -- Object Serialization -- Remote Method Invocation (rmi) -- Reading A Url -- Working With Proxies -- Internationalization -- Applets -- Threads In Applets -- Java Mail Api -- Commenting Code In Java -- Some Useful Tools -- Some Practical Examples -- Displaying Multiple Advertisements On Your Site -- Keeping Track Of Clicks On Advertisements -- Some Handy Classes And Methods In Some Useful Packages -- Servlets -- Html Forms -- Post And Get Methods -- Anatomy Of A Request And A Response -- Cgi Scripts -- Drawbacks Of Cgi. Vivek Sharma, Rajiv Sharma. Includes Index. Includes Bibliographical References And Index. System Requirements: Unix-compatible Operating System (i.e., Solaris, Dynix/ptx, Hp-ux, Linux). Having an e-commerce Web site is no longer a competitive advantage--it's now a competitive imperative. But constructing a profitable and effective e-commerce site involves much more than simply adding shopping-cart capabilities to an existing Web site. It requires an understanding of rapidly evolving issues and the integration of complex technologies. Developing e-Commerce Sites leads you step-by-step through the process of building a sophisticated e-commerce Web site. This book brings you up to speed on the latest technologies and shows you how to integrate them into a customized e-commerce site that serves your organization's specific needs. Details and instructions are reinforced by carefully crafted code examples that incorporate empowering technologies. The examples are included on the accompanying CD-ROM. In addition, the authors describe a complete e-commerce solution, illustrating system design, user interface, and utility classes. Developing e-Commerce Sites demonstrates actual implementation of the five requisite functions of an e-commerce inventory management, profiling, ordering, shipping, and reporting. You will find clear, practical information on such topics Java language basics Servlets and JavaScript SQL and JDBC XML and how it can be used in e-commerce Credit card verification Security Inventory management Customer profiling Ordering, shipping, and reporting With this book as a guide, technical professionals and managers charged with deploying an e-commerce site will learn the important issues, underlying technologies, and practical skills needed to accomplish this formidable task successfully. The complete, example-driven tutorial and reference covering today's leading technologies and solutions for e-commerce development, including Java, JavaScript, JDBC, SQL, XML, servlets, and security. CD-ROM with extensive Java, JavaScript and SQL e-commerce code examples. This work describes how various existing and emerging Web technologies can be integrated to build a state-of-the-art website to sell products over the Internet. An accompanying CD-ROM provides Java, JavaScript and SQL code examples to assist readers