Category Archives: NetBeans Visual Web Pack

Migrating Creator Apps to VWP and Tomcat

A customer recently sent email that he was having trouble migrating the Movie Administration Sample Application,
originally written for Sun Java Studio Creator, into NetBeans Visual Web Pack. When he opened
the project in VWP, he resolved the missing server error by setting the target server to the
Bundled Tomcat server. Upon running the application, he received the following error message:

package javax.faces does not exist

This error indicates that the J2EE packages are not available to the
Tomcat web server. The fix is to add the JSF 1.1 library to the project as follows:

  1. In the Projects window, right-click the Project_Name > Libraries node and choose Add Library from the pop-up menu.
  2. In the Add Library dialog box, select JSF 1.1 and click Add Library.

A second problem, an HTTP 500 Status error, occurred when deploying the application.
The server log included this error:

java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config

This is because the standard.jar/jstl.jar are needed for deploying to the Tomcat server. Here’s the fix:

  • In the Projects window, right-click the Project_Name > Libraries node and add in the JSTL 1.1 library.

For more information on migrating projects, see Importing a Sun Java
Studio Creator 2 Project in NetBeans Visual Web Pack 5.5
.

Ajax Text Completion and Web Services

Our newest Visual Web Pack tutorial, Using
the Ajax Text Completion Component
shows how
build a web application that contains a text field component created using Java BluePrints Ajax technology.
As you type in the text field,
auto-completion is attempted based on a list of possible expansions provided by a 180,000-word English dictionary.

This tutorial is significant in that it not only provides a good use case
for working with the Ajax Text Completion component, but also discusses how to work with a web service.
The dictionary that the application uses is provide by a web service.
To access the dictionary service client, you must download the Dictionary Service,
deploy the DictionaryService.war to your application server, and then add the web service to your application.
When you exercise the tutorial, however, note that there are minor differences in the web service code,
depending on whether you are working with a Java EE 5 or J2EE 1.4 project.

This tutorial is tailored for use with the Sun Java Application Server PE 9.0 Update Release 1.

Learning Trail for Visual Web Pack

If you take a look at the tutorials on our VWP tutorials index page, you’ll note that the tutorials are organized by category.
On this page, we’ve organized those same tutorials into four learning trails to help you find a tutorial based on your skill level.
The first trail covers the basics of creating a visual web application. From there, you move onto more advanced (and quicker-paced) trails on components, databases, and Ajax.

Trail 1: Creating a Basic Web Application

If you are new to visual web application development, follow this trail through the tutorials. These tutorials
cover the basics of web application and do not require any prior experience working with an integrated development environment (IDE).
After you complete these tutorials, you should be able
to create your own working application that accesses a database.

Trail 2: Learning More About Components and Databases

These tutorials go into the nitty-gritty details about components and databases and require a bit more programming knowledge. The final tutorial takes a little more time to complete as it covers the common (albeit advanced) scenario of creating a CRUD application. By the time you have completed this trail, you should be able to create a more sophisticated web application.

Trail 3: Putting Ajax Into Action

If you’ve come this far, you’re ready to work with the Ajax components. These components can make your web application appear more responsive (due to asynchronous refreshes of the page).

Trail 4: Working With Third-Party Software

This trail is for you if you want to extend outside the bounds of Visual Web Pack and work with either the Hibernate or JasperReports frameworks.

NetBeans Community Docs

The Sun Java Studio Creator community page has been live for several months, with some great user contributions. Now the VWP users have a place to contribute as well. The NetBeans Community Docs Wiki Page enables community members to submit tutorials, white papers, FAQs, tips and tricks, Flash demos, and blogs. The wiki page includes easy-to-follow instructions for submitting content. In addition, James Branam, the Community Docs Manager, includes tips for submitting content in his blog.

Thanks to Sapan Parikh, there is already a community-written VWP tutorial, Component Creation at Runtime Tutorial. This tutorial shows users how to create components, such as command buttons and input text, at run time.
James has also written a nice spotlight on Sapan Parikh in his blog.

On a similar note, don’t forget the Feedback buttons at the bottom of our tutorials. You can continue to send suggestions and questions on our
VWP tutorials by clicking the button and filling out the form.
All writers who work on the VWP tutorials receive the feedback. We try to respond as soon as possible, but sometimes it takes us a while to dig up the answer.
We especially appreciate the thank yous you send us–it makes our day.

If you have technical questions outside the documentation, you can find more information from the the NetBeans Users alias, nbusers@netbeans.org. To subscribe to the alias, go to this page: http://www.netbeans.org/community/index.html.

New Tree Tutorial

We have yet another new tutorial, this one titled
Building a Tree From Database Data
.
This tutorial shows how to
build a two-page application, the first page of which includes a Tree component. You populate the first-level nodes in the
Tree with names from a database, and the second-level nodes with the trips for that person.
The trip nodes are links to a second page, which displays the details for that trip.

Calendar Components in Visual Web Pack

Our newest tutorial, Using the Calendar Component, describes how to work with the built-in Calendar component
in the Basic section of the Palette.
This tutorial provides good use cases for working with the Calendar component,
including how to set the the minimum and maximum calendar date,
how to verify that a date that the user selects falls within a range,
and how to change the calendar style.

Another option for you to try is the Popup Calendar component in the BluePrints Ajax Component Library.
The Popup Calendar component was designed to fix the limitations in the built-in Calendar.
However, the Popup Calendar component is a prototype and might not fit seamlessly with the
other components built into the IDE.
For instructions on accessing the Popup Calendar component, see Downloading and Importing Ajax and Other Components.

Hibernate for Visual Web Pack

A couple of months ago, JB blogged about how to use the Sun Java Studio Creator tutorial to learn about using Hibernate with the Visual Web Pack. We are happy to announce that there is now a Using Hibernate With the Visual Web Pack tutorial. Not only does this show how to use the Hibernate framework in a Visual Web application, it also shows how to use ObjectListDataProvider objects and how to fill an Options array for list-type components.