background preloader

Databases

Facebook Twitter

Document Information - The Java EE 6 Tutorial. Copyright © 2013, Oracle and/or its affiliates. All rights reserved. January 2013 500 Oracle ParkwayRedwood City, CA 94065U.S.A. This tutorial is a guide to developing enterprise applications for the Java Platform, Enterprise Edition 6 (Java EE 6) using GlassFish Server Open Source Edition. Copyright and License: The Java EE 6 Tutorial This tutorial is a guide to developing applications for the Java Platform, Enterprise Edition and contains documentation ("Tutorial") and sample code.

The "sample code" made available with this Tutorial is licensed separately to you by Oracle under the Berkeley license. This Tutorial is provided to you by Oracle under the following license terms containing restrictions on use and disclosure and is protected by intellectual property laws. The information contained herein is subject to change without notice and is not warranted to be error-free. If the Tutorial is licensed on behalf of the U.S. U.S. No Technical Support. Creating a Simple Web Application Using a MySQL Database. Written by Troy Giunipero This document describes how to create a simple web application that connects to a MySQL database server. It also covers some basic ideas and technologies in web development, such as JavaServer Pages (JSP), JavaServer Pages Standard Tag Library (JSTL), the Java Database Connectivity (JDBC) API, and two-tier, client-server architecture.

This tutorial is designed for beginners who have a basic understanding of web development and are looking to apply their knowledge using a MySQL database. MySQL is a popular open source database management system commonly used in web applications due to its speed, flexibility and reliability. MySQL employs SQL, or Structured Query Language, for accessing and processing data contained in databases.

This tutorial is a continuation from the Connecting to a MySQL Database tutorial and assumes that you have already created a MySQL database named MyNewDatabase, which you have registered a connection for in the NetBeans IDE. Contents Notes: The NetBeans E-commerce Tutorial - Connecting the Application to the Database. This tutorial unit focuses on communication between the database and the application.

You begin by adding sample data to the database and explore some of the features provided by the IDE's SQL editor. You set up a data source and connection pool on the GlassFish server, and proceed by creating a JSP page that tests the data source by performing a simple query on the database. This unit also addresses how the application retrieves and displays images necessary for web presentation, and how to set context parameters and retrieve their values from web pages. Once you are certain the data source is working correctly, you apply JSTL's core and sql tag libraries to retrieve and display category and product images for the index and category pages.

You can view a live demo of the application that you build in this tutorial: NetBeans E-commerce Tutorial Demo Application. Notes: The NetBeans IDE requires the Java Development Kit (JDK) to run properly. Adding Sample Data to the Database category table. Java DB - Reference.