advertisement
javaboutique
Search Tips
Articles  |   Tutorials  |   Reviews  |   Tools  |   by Category  |   by Date  |   by Name  |   Submit  |   Source  |   Forums  |  
javaboutique
Browse DevX


Partners & Affiliates











advertisement

Tutorials : NetBeans Visual Web Pack: Learning by Example :

Create the MYSTORE Database for the Application

By default, VWP comes with a test database named Travel. You won't be using that database in this article, so you have to install a new one that matches the right conditions. To do this, download the MYSTORE.zip archive and extract the content in the directory where the other NetBeans databases are. If you do not know where to put it, launch NetBeans and check this:
Tools::Options::Advanced Options::IDE Configuration::Server and External Tool
Settings::Java DB Database
Looking at the panel on the right, you will notice the database's location property. That's the directory in which you'll place the new database, named MYSTORE. Now, start NetBeans and set up a new connection for this database. Access the Runtime window (if is not visible, display it from Window::Runtime or Ctrl+5) and expand the database node. Right-click on this node and select the New Connection item from the popup menu. This will display the New Database Connection window. Populate the text fields as follows:
  • Database URL: jdbc:derby://localhost:1527/MYSTORE
  • User Name: MYSTORE
  • Password: MYSTORE
Click OK and wait for connection to be established. A new JDBC connection should appear in the connection list under the Databases node.

Before you start developing your application, copy and unzip the img.zip directory in any directory on your computer. Later you will use this directory to upload product images, so don't forget where you put it.

Create the Application Using VWP

The sample application you'll be building is a simple interface to administrate the database of an e-commerce site. To begin, open NetBeans and create a new application:
  • From the File menu, choose the New Project item.
  • From the New Project window, select Web from Categories and Visual Web Application from Projects. Then click Next.
  • For the Project Name, type MyStoreAdminGUI.
  • For the Server, choose Sun Java System Application Server 9.
  • For the Java EE Version, choose Java EE 5.
  • Click Finish.
The Design window should look something like Figure 2.


Figure 2: The Newly Created Application

Next, start the Java DB server and connect to the MYSTORE database:

  • From the Tools menu, choose Java DB Database::Start Java DB Server.
  • From the Runtime window, expand the Database node and select the connection specific to the MYSTORE database.
  • Right-click on it and select the Connect item from the popup menu.
  • In the Connect window, type MYSTORE in the Password text field. Then click OK.

Home / Articles / NetBeans Visual Web Pack: Learning by Example / 1 / 2 / Next Page

How to Add Java Applets to Your Site

New on the Java Boutique:

New Review:

Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling API boasts simplicity, ease-of-integration, a well-rounded feature set, and it's free!

New Applet:

Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA sequences into three useful formats.

Elsewhere on internet.com:

WebDeveloper Java
Lots of Java information on webdeveloper.com

WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.

ScriptSearch Java
Hundreds of free Java code files to download.

jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.

 Microsoft Visual Studio 2010 Showcase
 Avaya Developer Showcase
 MSDN Spotlight
 PHP for Windows Showcase
XML error: undefined entity at line 39
advertisement
Receive Articles via our XML/RSS feed
Receive Articles via our XML/RSS feed

JavaBytes
Internet Cyclone
This powerful, easy-to-use, internet optimizer is for Windows 95, 98, ME, NT, 2000 and XP. It's designed to automatically optimize your Windows settings, boosting your Internet connection up to 200%.

Windows 7: From Beta to Final Code in One Year
Google Shows Off Chrome OS, Releases Source
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?
Fedora 12 Takes Aim at Linux Networking
Top Supercomputer Nearly Doubles in Speed
Fedora 12 Linux Tackles Virtualization
Apple Gives iPhone Developers App Status Tracker
Novell Sets OpenSUSE 11.2 Free

Creating Custom Export Filters for StarOffice with XSLT
WPF Wonders: Using DataTemplates
Crystal Reports Family Offers Options for Developers
Avaya Aura Session Manager video
Avaya Aura Overview video
Exploring HTML 5's Audio/Video Multimedia Support
Overriding Virtual Functions? Use C++0x Attributes to Avoid Bugs.
Understanding the Cloud Computing Security Vulnerabilities
Cisco and IBM Target a Greener World
Upgrade to Visual Studio 2010 with the Ultimate Offer

Advertising Info  |   Member Services  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs