Introduction part 1 : Creating a Web Application with the JSF Framework

July 26, 2008 at 12:28 am (programming)

You can add JSF support to existing web applications that are opened in the IDE, or to any new projects. The GlassFish server already includes the JSF libraries, so you do not need to download or install them in the application server. In this example, you add JSF support while creating a new web application project.
Choose File > New Project (Ctrl-Shift-N) to open the New Project wizard. Under Categories select Web; under Projects select Web Application. Click Next.
Name the project jAstrologer, specify a location for the project on your computer, then click Next.
In the third step of the wizard, named Server and Settings, set the server to GlassFish V2, set the Java EE Version to Java EE 5, and click Next.
Select the JavaServer Faces option and click Finish.

The IDE creates a project template for the entire application, and opens an empty JSP page (welcomeJSF.jsp) in the Source Editor. You can view the new project’s logical structure in the Projects window (Ctrl-1). Expand the project’s Libraries > GlassFish V2 node. Notice that the JSF libraries, such as jsf-impl.jar, are added to the classpath. Expand Configuration Files and notice that the IDE has created a faces-config.xml file, which controls the behavior of JSF components in the web application. The IDE has also registered the Faces servlet in the web.xml deployment descriptor. The Faces servlet handles navigation between JSP pages that are controlled by the JSF framework.

references :

http://www.netbeans.org/kb/61/web/jastrologer-intro.html

illustration

illustration

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.