Sample Database support in Visual Web Pack for NetBeans 5.5
Visual Web Pack includes a sample database, named Travel
Travel is installed automatically after Java DB is registered in the IDE.
Once Java DB is registered, a restart of the IDE is required.
If the NetBeans userdir is deleted then the same as above applies.
Java DB can be registered by either installing Sun Java System Application Server 9 (Glassfish)
or installing manually.
Java DB (Derby) can be registered by opening Tools->Options - Advanced - IDE Configuration - Server and External Tool Settings - Java DB Database
Here the installation of Derby is specified along with the path where databases are created (default location is $HOME/.netbeans-derby)
After restarting NetBeans, in the Runtime tab there will be a new connection for Travel.
More info:
To use the Travel database in a Visual Web Pack application, in the Runtime tab, open the context menu for the connection
jdbc:derby://localhost:1527/travel [travel on TRAVEL] then choose connect.
A login dialog will open - travel is the password
After the connection is successful, create a new Visual Web Pack project and back in the Runtime tab, expand the Travel connection node, Table
then click on a table and drag and drop the table to the Design view or on top of a JSF component in the Design view.
When a table is dropped, a dataprovider instance is created in the Page1 bean class and a JSF binding expression is generated in the JSP source.
To see bindings, either select a component and the Properties window will reflect the bindings. Alternatively, right-click on the component
and choose Property Bindings context menu.
Note, that when exiting NetBeans, Java DB and SJSAS are shut down. After restarting NetBeans, also
start Java DB, otherwise, the Component Error page will open. If this page opens then start Java DB
then click the Refresh button located at the top of the Design page (the button with 2 squiggly
arrows pointing in opposite directions)
If the tables and or data are lost for Travel, to restore the databases, a SQL script is included.
Choose File->Open and navigate to the installation directory of NetBeans 5.5 and open rave2.0/startup/samples/create-Travel-derby.sql
The SQL editor will open. Then make sure to select the Travel connection from the dropdown in the editor (maximize NetBeans if the dropdown is not
visible) then click the small green arrow adjacent to the connection dropdown. The Travel tables and data will be restored.
Look for VWP tutorials coming soon or see the Creator 2 Tutorials, some are still applicable to the Visual Web Pack.
For more info on Creator 2 to Visual Web Pack, see Winston Prakash's blog

Posted by jaider fernando rodriguez lozano on December 19, 2006 at 05:12 AM PST #
Posted by John Baker on December 19, 2006 at 11:14 AM PST #
its really v helping! I applause it by heart!
Posted by Sami on August 19, 2009 at 12:31 AM PDT #