Friday, June 27, 2008

Setting Up a Web Application Project :

Choose File > New Project (Ctrl-Shift-N) from the main menu. Under Categories, select Web. Under Projects, select Web Application then click Next.

In Step 2, enter HelloWeb in the Project Name text box. Notice that the Context Path (i.e., on the server) becomes /HelloWeb.

Specify the Project Location to any directory on your computer. For purposes of this tutorial, this directory is referred to as $PROJECTHOME. 

Note: Creating a project in NetBeans IDE 6.1 includes new options which can be left at the default. For example, the Use Dedicated Folder for Storing Libraries checkbox may be left unselected.
If you are using NetBeans IDE 6.1, Click Next; otherwise continue to step 5. 

Select the server to which you want to deploy your application. Only servers that are registered with the IDE are listed. 

Select the version of Java EE you want to use with your application and click Next.

In the Frameworks panel, click Finish to create the project. 

The IDE creates the $PROJECTHOME/HelloWeb project folder. The project folder contains all of your sources and project metadata, such as the project's Ant build script.

The HelloWeb project opens in the IDE. The welcome page, index.jsp, opens in the Source Editor in the main window. You can view the project's file structure in the Files window (Ctrl-2), and its logical structure in the Projects window (Ctrl-1)


Composite View :

A design pattern that is used to present information in JSP pages. This design pattern creates an aggregate view from component views. Component views might include dynamic and modular portions of the page. The Composite View design pattern pertains to web application design when you are creating a view from numerous subviews. Complex web pages frequently consist of content derived from various resources. The layout of the page is managed independently of the content of its subviews. For instance, a view might have subviews such as Navigation, Search, Feature Story, and Headline.

When creating a composite view, you can include static content and dynamic content. Static content might consist of an HTML file. Dynamic content is a fragment of a JSP page. The specific content can be determined at either JSP translation time or at runtime.

Front controllers :

Components that are responsible for routing incoming requests and enforcing navigation in web applications. For more information on the use of the Front Controller design pattern, see the J2EE Patterns catalog.

JSP Pages :

Files that are used in web applications to present information to end users and to enable data from end users to flow back to the server. JSP pages must be placed within a web application in order for the JSP pages to be executable within the IDE.

Servlets :

Java classes that execute within a servlet container, which is typically running within a web server. Servlets are used to do the following:

Generate dynamic content.
Extend the capabilities of web servers and web-enabled application servers.
Interact with web clients (typically a browser application such as Netscape or Internet Explorer) using a request-response paradigm.