NetBeans Visual Web Pack 5.5 provides an environment for rapidly building web applications with AJAX-enabled JavaServer Faces components, support for drag-and-drop binding to data sources, and more.
Contents
Note: The AJAX components included with NetBeans Visual Web Pack 5.5 Technology Preview are samples only, and are not meant for production applications.
This topic specifies the prerequisites that must be met before you start to install NetBeans Visual Web Pack 5.5.
System Setup
The following table lists the minimum hardware and operating system requirements to run NetBeans Visual Web Pack 5.5:
Platform
CPU
RAM
Disk Space
Operating System
Supported Browsers
Solaris SPARC
UltraSPARC III at 750-MHz processing speed
1 GB
130 MB
Solaris 10 OS
Sun-supported Mozilla 1.7
Solaris (x86 Platform Edition)
Intel Pentium 4 (or equivalent) at 1 GHz processing speed
1 GB
130 MB
Solaris 10 OS
Sun-supported Mozilla 1.7
Microsoft Windows
Intel Pentium 4 (or equivalent) at 1 GHz processing speed
1 GB
130 MB
Windows 2000 Professional Edition (Service Pack 4),
Windows XP Professional Edition (Service Pack 2)
Internet Explorer 5.5 Service Pack 2 (Windows 2000)
Internet Explorer 6 Service Pack 2 (Windows XP)Linux
Intel Pentium 4 (or equivalent) at 1 GHz processing speed
1 GB
130 MB
Red Hat Fedora Core 3
Firefox 1.0.4 (minimum)
Mac OS
1 GHz PowerPC G4
1.83 GHz Intel Dual Core1 GB
130 MB
Macintosh OS 10.4, 10.4.5
Safari 1.2.1 minimum (Safari 2 minimum for OS 10.4.5), Mozilla 1.6
Required Software
The following software must be installed before you install NetBeans Visual Web Pack 5.5:
- NetBeans IDE 5.5.
- Java SE Development Kit (JDK) 5.0 Update 6 (version 1.5.0_06) or higher.
If you do not have an installation of JDK 5.0 Update 6 or higher, you cannot proceed with the installation. You can download this JDK from the Java SE Downloads page.
Note that Mac OS X installations require Java 2 Standard Edition (J2SE) 5.0 Release 4. You can download this JDK from the Apple Downloads page. Search for "J2SE" to locate this release.- An application server
To take advantage of Visual Web Pack's sample applications and databases, use Sun Java System Application Server 9, Platform Edition, the open source Java EE 5 application server. For more information, see Java EE Downloads.
Firewall Applications
Enabled firewall applications can prevent some components from being configured correctly during the installation process. Consult your firewall documentation to determine if your firewall should be disabled before installation.
Information on configuring NetBeans Visual Web Pack 5.5 for databases and applications servers can be found in the Installation Guide.
If Visual Web Pack is configured to use Sun Java System Application Server 9, Platform Edition then a bundled database server (Java DB) is included. For more information on Java DB, see Java DB at a Glance. Once the Sun Java System Application Server is configured, and after the IDE is restarted, a sample database named Travel and a database connection for Travel are configured. If the home directory, located under <HOME>/.netbeans/5.5, is removed, the databases will remain intact until the next time Sun Java System Application Server is reconfigured. The sample database directory is located in the home directory .netbeans-derby.
Note: Before resolving a databse connection to the Travel database, you must start the Java DB.
Bundled Database
If you install Sun Java System Application Server, you can set up the bundled Java DB database to work with NetBeans Visual Web Pack 5.5 as well.
To set up the Java DB server for a standalone NetBeans IDE 5.5 installation:
- Launch the IDE.
- Register Sun Java System Application Server in the NetBeans IDE Runtime window as described in the Installation Guide.
- Select Tools > Options, and in the Options dialog, click Advanced Options.
- Expand IDE Configuration > Server and External Tool Settings and select Java DB Database to verify the database settings.
Restoring Database Connections
When opening Java Studio Creator projects that have components bound to rowsets in Visual Web Pack, the IDE fails to find the data sources. When importing projects into Visual Web Pack, the IDE advises you to backup the project as you will not be able to re-open it in Java Studio Creator. To resolve missing data connections, you first add the database driver and then reconnect the project to the database. You do not need to add the database driver if the project uses for Java DB, and you installed Sun Java System Application Server as described under Bundled Database.
To add the database driver:
- Open the Runtime window.
- Expand the Databases node. Right-click Drivers and and select New Driver.
- In the New JDBC Driver window, click Add. Navigate to the database's .jar file and click Open.
- Select the Driver Class, type a name for the database (or keep the default), and click OK.
- Right-click the Databases node and select New Connection.
In the New Database Connection dialog:
- Select the database from the Name drop-down list.
- Type the Database URL.
- Type the user name and password.
- Click OK.
- Under the Databases node, Right-click the database URL associated with the database and Right-click the database connection and choose connect. You may be prompted for a password.
See Supported Databases, JDBC Drivers and Deployment Containers for more information on drivers and database URLs.
To resolve the database connection:
Open the Projects window. The IDE searches for missing data connections. Note that the larger the project, the longer this process takes.
When the IDE determines that data connections are missing, it badges the project node icon and displays the project name in red.- Right-click the project with the missing data connection, and choose Resolve Database Problems from the pop-up menu.
- In the Resolve Data Source(s) dialog, select the database name and click Add Data Connection.
In the Add Database Connection dialog, select your database from the Server Type drop down list, provide the requested information, and click OK.
For Java Studio Creator applications that use Java DB , type the User ID and Password associated with the application. For example, the User ID and Password for the CorporateTravelCenter project are both travel. The database URL has the following format: jdbc:derby://host_name:port_number/database_name. For example, the database URL for the Travel database bundled with Java DB, on the default port is jdbc:derby://localhost:1527/travel.Supported Databases, JDBC Drivers, and Deployment Containers
NetBeans Visual Web Pack 5.5 is tested on the following databases and drivers:
- Oracle Driver / Oracle Database
- Microsoft Driver / SQL Server Database
- IBM Driver / DB2 Database
- DataDirect / Oracle/SQLServer/DB2/Sybase
Oracle driver tested on the Oracle database:
Driver Location Oracle Database 10g Release 2 JDBC Drivers Driver Versions Oracle Database 10g Release 2 (10.2.0.2) Driver JAR File ojdbc14.jar Driver Classnames oracle.jdbc.driver.OracleDriver URL Formats jdbc:oracle:thin:@//hostname:port/database Example URL jdbc:oracle:thin:@//localhost:1521/ora9i Microsoft driver tested on the SQL Server database:
Driver Location Microsoft SQL Server 2005 JDBC Driver 1.1 Driver Version Microsoft SQL Server 2005 JDBC Driver 1.1
sqljdbc_1.1.1501.101_enu.tar.gzDriver JAR File sqljdbc.jar Driver Classname com.microsoft.sqlserver.jdbc.SQLServerDriver URL Format jdbc:sqlserver://hostname:1433;databaseName=database;selectMethod=cursor Example URL jdbc:sqlserver://localhost:1433;databaseName=travel;selectMethod=cursor IBM drivers tested with the DB2 database:
Driver Location DB2 Personal Developer's Edition: Redistributable JDBC Type 4 Driver (requires registration) Driver Version Redistributable DB2 JDBC Type 4 driver v8 fixpack 11
db2_jdbc_t4_fp11.zipDriver JAR Files Type 4 Type 2
- db2jcc.jar
- db2jcc_license_cu.jar
- db2jcc.jar
- db2jcc_license_cu.jar
- db2jcc_javax.jar
Driver Classname com.ibm.db2.jcc.DB2Driver URL Format (Type 4) jdbc:db2://hostname:port/database Example URL jdbc:db2://localhost:50002/sample DataDirect drivers tested with Oracle, SQL Server, DB2 and Sybase databases:
Driver Location DataDirect Connect for JDBC, Release 3.6 Service Pack 1 Driver Versions DataDirect Connect for JDBC - 3.6
DataDirect Connect for JDBC - 3.6.07Driver .jar Files Sun Branded Driver .jar Files
- smbase.jar
- smdb2.jar
- sminformix.jar
- smoracle.jar
- smresource.jar
- smspy.jar
- smsqlserver.jar
- smsybase.jar
- smutil.jar
DataDirect Driver .jar Files
- base.jar
- util.jar
- spy.jar
- resource.jar
- oracle.jar
- sybase.jar
- sqlserver.jar
- db2.jar
- informix.jar
Driver Classnames Sun-branded Driver Classes
- com.sun.sql.jdbc.oracle.OracleDriver
- com.sun.sql.jdbc.sqlserver.SQLServerDriver
- com.sun.sql.jdbc.db2.DB2Driver
- com.sun.sql.jdbc.sybase.SybaseDrive
DataDirect Driver Classes
- com.ddtek.jdbc.oracle.OracleDriver
- com.ddtek.jdbc.sqlserver.SQLServerDriver
- com.ddtek.jdbc.db2.DB2Driver
- com.ddtek.jdbc.sybase.SybaseDriver
URL Formats Sun-branded URL Formats
- jdbc:sun:oracle://server_name[:portNumber][;SID=database]
- jdbc:sun:sqlserver://server_name[:portNumber];databaseName=database;selectMethod=cursor
- jdbc:sun:db2://server_name:portNumber;databaseName=database
- jdbc:sun:sybase://server_name[:portNumber]
DataDirect URL Formats
- jdbc:datadirect:oracle://server_name[:portNumber];SID=database
- jdbc:datadirect:sqlserver://server_name[:portNumber];databaseName=database
- jdbc:datadirect:db2://server_name[:portNumber]databaseName=database
- jdbc:datadirect:sybase://server_name[:portNumber
Example URLs jdbc:sun:oracle://localhost;SID=ora9i
jdbc:sun:sqlserver://localhost:1433;DatabaseName=travel;SelectMethod=cursor
jdbc:sun:db2://localhost:50002;databaseName=sample
Note: The IBM drivers support both Type 2 (native) and Type 4 (pure Java). The type is usually controlled by the URL used to connect, however, Sun Java System Application Server launches the drivers in Type 2 by default. To run the drivers in Type 4, add the property driverType = 4 to the Connection Pool. You may need to deploy the application once, allow the deployment to fail, then manually edit the Connection Pool on the server to add the property.
Note: The libraries are not posted on the web with driver .jar files, but must be obtained from a local DB2 release. On the Windows platform the library is db2jcct2.dll, and on Unix it is libdb2jcct2.so. Copy this file into the same /lib directory as the .jar files.
The unresolved issues for this release are as follows:
Description: To use the Travel Database with Sun Application Server 9 PE, you must restart the IDE after choosing the application server in the Servers window.
Description: Application deployment returns the error "Unable to delete file ...\build\web\WEB-INF\lib\appbase.jar".
Workaround: Stop and restart the application server and deploy the application again.
Description: On Microsoft Windows XP, using the Windows XP display style, button text is replaced with ellipses. This problem is related to JDK 5.0 Update 8 (version 1.5.0_08).
Workaround: Change your display style to Windows Classic as follows:
- Choose Start > Settings > Control Panel.
- On the Control Panel, double-click Display.
- On the Appearance Tab, choose Windows Classic style under Windows and Buttons.
Components of the webui component library (based on JSF 1.1/J2EE 1.4), bundled with NetBeans Visual Web Pack 5.5, work poorlyDescription: Some components of the webui component library (based on JSF 1.1/J2EE 1.4), bundled with NetBeans Visual Web Pack 5.5, including the Table component, do not work correctly with the MyFaces JSF 1.1 implementation.
Workaround: Replace MyFaces with the JSF Reference Implementation on the server. To do so, move the jbossweb-tomcat55.sar/jsf-lib directory outside of the default directory before creating Visual Web Pack projects for that container. When you create a project after deleting this directory, the IDE is forced to bundle the JSF Reference Implementation.
To go back to using MyFaces runtime for running non-Visual Web Pack based applications, follow these steps:
- In the Projects window, right-click the Libraries node and choose Add Library.
- In the Add Library dialog box, select the desired MyFaces binaries.
Click Add Library.
If you do not find the MyFaces binaries, add the binaries using the Add JAR/Folder option and browse to the jsf-lib directory that you moved away above, and add all the JAR files in it.- Make sure the JSF-RI libraries are not deployed.
- Modify web.xml to include the following:
<listener> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class> </listener>
Description: When a project is created, the classpath on the container is checked and when a MyFaces implementation is found, that implementation takes precedence. Removing the MyFaces implementation forces the application to bundle the JSF-RI libraries.
Workaround: Move the following file outside of the default directory before creating Visual Web Pack projects for that container:
JBOSS_HOME/server/default/deploy/jbossweb-tomcat55.sar/jsf-lib
Description: Because JBoss is not an EE5 server, the TopLink Essentials library is required in web applications deployed to it. The TopLink Essentials library provides JPA functionality for the EJB 3.0 Reference Implementation.
Workaround: Add the TopLink Essentials library to an application as follows:
- Copy your database's JDBC driver to the web application's lib directory.
- Copy toplink-essentials.jar and toplink-essentials-agent.jar from your Sun Java System Application Server installation's lib subdirectory to the lib directory of the web application. If you do not have Sun Java System Application Server, download it from Sun Developer Network's Java EE Downloads page.
- Edit persistence.xml to include:
<property name="toplink.jdbc.driver" value="<jdbc-driver>"/>
<property name="toplink.jdbc.url" value="<jdbc-url>"/>
<property name="toplink.jdbc.password" value="<jdbc-password>"/>
<property name="toplink.jdbc.user" value="<jdbc-user>"/>
Description: When a database URL is modified at design time, it is not updated into data source information.
Workaround: When you change a connection, re-bind any components to the modified connection as described above in Restoring Database Connections. This will ensure that the design context, all the connection pools, etc. are updated.
Description: Java EE 5 deployment of applications to Sun Java System Application Server hangs due to the server's deployment manager depending on code that is not thread safe.
This issue seems limited to multiprocessor or multicore computers running Windows XP.
Workaround: Restart the IDE, then using the Server Manager:
If it is not possible to start or stop the application server, stop all Java processes via the task manager before restarting the IDE.
- Restart the application server if necessary.
- Undeploy all applications.
- Redeploy the applications.
Description: IDE throws IllegalStateException when reopening a project with a renamed folder or reopening a folder with a renamed page.
Workaround: Only rename folders from within the Source Packages node. Right-click the folder under this node and select Refactor > Rename from the pop-up menu. Note that the IDE does not currently support renaming the default Bean package.
Description: Using Oracle JDBC driver to establish a connection to a database returns the error java.lang.ClassNotFoundException: oracle.sql.TIMESTAMP when dropping table with this column type onto a component.
Workaround: Use the DataDirect JDBC driver for Oracle as described above under DataDirect Drivers.
Description: The Add menu item does not appear for SessionBean1, RequestBean1, ApplicationBean1 in the Outline window.
Workaround: Add properties to managed beans in the Project window as follows. To add a property to a Session Bean:
The process is the same for Application and Request beans.
- Open the Project window
- Expand both the project's node and the Session Bean node.
- Right-click SessionBean1 and select Add and the name of the property from the pop-up menu.
Description: Using MySQL, attempting to bind the Drop Down List component to table data returns an IllegalArgumentException.
Workaround: When the error occurs, close the Bind to Data dialog and open it again. If this fails, close and reopen the project.
Description: A query made in the View Data window that concludes with whitespace or a carriage return is not executed.
Description: Tables dragged directly from the Databases node of the Runtime window onto a page created in the Visual designer cannot be edited there.
Workaround: To work with tables in the Visual Designer:
- Drag a database table onto the form.
- In the Outline window, expand the SessionBean node and select the dropped rowset.
- In the Properties window, click the ellipsis (...) button next to the command property and edit it to reference the view instead of the table.
Description: In projects in which web services has been added, the import statement should autocomplete in the Java view (i.e., the web service package should be visible to the application), but the IDE returns "No suggestions".
Workaround: Build the project first, then the Java source editor will provide suggestions.
Description: Images associated with components do not render properly when reloaded.
Workaround: Manually set the background image Using code such as the following:
<h:panelGrid binding="#{Page1.gridPanel1}" id="gridPanel1" style="background-image: url(/WebApplication1/resources/flower.gif); height: 200px; left: 312px; top: 240px; position: absolute" width="312"/>
Description: A validator added to a required Text Field component returns the correct message if entered values are too large or too small, but non-integer values produce PROCESS_VALIDATION errors.
Description: These components remain clickable even after setting its attribute to readOnly.
Workaround: Use the disabled attribute so that the component renders when it applies but must not be changed.
Also, use scripting to prevent changes on an element that is readOnly. Here, button1_action toggles the readOnly property of checkbox1:
<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:webuijsf="http://www.sun.com/webui/webuijsf">
<jsp:directive.page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"/>
<f:view>
<webuijsf:page binding="#{Page1.page1}" id="page1">
<webuijsf:html binding="#{Page1.html1}" id="html1">
<webuijsf:head binding="#{Page1.head1}" id="head1">
<webuijsf:link binding="#{Page1.link1}" id="link1" url="/resources/stylesheet.css"/>
<webuijsf:script binding="#{Page1.script1}" id="script1"><![CDATA[
function preventIfReadOnly(element) {
if (element.readOnly != false) {
//element is readOnly, so prevent change by returning false
return false;
}
//allow change by returning true
return true;
}
]]></webuijsf:script>
</webuijsf:head>
<webuijsf:body binding="#{Page1.body1}" id="body1" style="-rave-layout: grid">
<webuijsf:form binding="#{Page1.form1}" id="form1">
<webuijsf:checkbox binding="#{Page1.checkbox1}" id="checkbox1" label="Checkbox" onClick="return preventIfReadOnly(this);" style="position: absolute; left: 192px; top: 192px"/>
<webuijsf:button actionExpression="#{Page1.button1_action}" binding="#{Page1.button1}" id="button1"
style="position: absolute; left: 216px; top: 288px" text="Toggle checkbox readOnly property"/>
<webuijsf:messageGroup binding="#{Page1.messageGroup1}" id="messageGroup1" style="position: absolute; left: 432px; top: 120px"/>
</webuijsf:form>
</webuijsf:body>
</webuijsf:html>
</webuijsf:page>
</f:view>
</jsp:root>
Description: When the user clicks and drags code from source code onto the clips palette, the code is cut rather than copied.
Workaround: To copy, rather than cut, the code, hold the Ctrl key when performing drag and drop operations from the source code.
Description: Due to a browser limitation, marking an <option> inside a <select> as disabled="disabled" does not prevent it from being selected on IE and NS8.
Description: The JDBC driver lost when user directory is deleted, therefore the user cannot resolve missing data connections.
Workaround: Before deleting the user directory copy the jdbc-drivers folder to an external directory and return it to the user directory after reinstallation.
Description: The IDE renames getter and setter methods if the user answers Yes in the pop up dialog that covers these methods, however, other references to these methods are not updated. When an application is deployed in which only the name of a variable, for example that of a bean property, is changed, the IDE throws a compiler error.
Description: NetBeans does not copy the JDBC driver JAR files to the deployment container.
Workaround: Copy the JAR files manually into the container's class path.
Description: When the user adds a custom property into a life cycle managed bean, the property is not displayed in the Items property editor.
Workaround: Before using the new properties perform these steps:
- In the Projects window, right-click the project and choose Clean and Build Project
- Close the project.
- Reopen the project.
Java Server Pages
http://www.netbeans.org/issues/show_bug.cgi?id=88510
With Visual Web modules enabled Java Server Pages hidden in free form projects.Description: If you downloaded and installed NetBeans Visual Web Pack 5.5 Technology Preview between October 29,2006 and November 3, 2006, you might have found that enabling Visual Web modules hides Java Server Pages in free form projects. This is documented in NetBeans issue 88510. This problem has been fixed in downloads available after November 4, 2006.
Workaround 1: Download the patch from the Visual Web Pack Update Center as follows:
From the IDE's main menu, choose Tools > Update Center.
The Update Center wizard opens. If you are working behind a firewall, you must configure the proxy server. Click Proxy Configuration and enter your proxy information in the dialog box.- Ensure that NetBeans Visual Web Pack Update Center is selected.
- Click Next in the Update Center wizard. The wizard checks for available updates and new modules, then opens the Select Modules to Install pane if there are updates or new modules available.
- In the left panel, select Complib (version 1.1) and JSF Project Core (version 1.2.0.2), then click the Add button to move them to the Include in Install panel.
Click Next, then read and accept the license agreement.
The Update Center wizard downloads the patch.- Click Next to install the module into the IDE, click Finish, and click OK to restart the IDE.
Workaround 2: Disable the NetBeans Visual Web Pack 5.5 modules as follows:
- From the IDE's main menu, choose Tools > Module Manager.
- In the Module Manager, uncheck the box in the Active column associated with Visual Web.
- Once the IDE has updated the modules, click Close.
These modules can be re-enabled at any time using the same steps.
Documentation for the NetBeans Visual Web Pack 5.5 release is provided in the form of web-based guides and the IDE's help system. You can use the following document to get started:
You can also find useful information on the NetBeans Project web site. Since the NetBeans IDE is an open-source project, the web site also provides access to source code, an issue database, information on creating your own NetBeans modules, and much more.
For more information, visit http://www.netbeans.org/.