Creating an application with NetBeans seems to be obvious easy. Indeed, it is. If you know, which build system to use.

Choose File, New Project from the menu or simply press Ctrl+Shift+N to open the New Project wizard.

NewWebAppNow you may choose Java Web, Web Application and click onto Next. NetBeans guides you thru a couple of dialogs. You can choose the application name and location, the server and its settings and on the last one, the framework you want to use.

NewWebAppFrameworkThen, if you click onto Finish, NetBeans creates the application for you. This app will use Ant as build system. Sadly, there is no chance to choose the build system at the end of the wizard.

If you want to use Maven, the approach is a little different: Within the New Project wizard you first have to choose Maven and then the type of application (Web Application).

NetBeans queries some Maven typical information (screen shot below), and then the server settings.

NewWebAppDialogue1These series of dialogs offer no screen to add the web framework. If you want to create a JSF application, let NetBeans first create the project for you. Then open the project properties, e.g. by right clicking the project tree.

Choose Frameworks. Here you get your chance to add JSF.

ProjectPropertiesFrameworksThat’s it. Enjoy!

 

BTW: TinyCalculator is the first and simplest web application discussed in my book “Web Development with Java and JSF”.