background image

Deploy Application In NetBeans IDE

<< What Is a JSP Page? | The Bookstore Application >>
<< What Is a JSP Page? | The Bookstore Application >>

Deploy Application In NetBeans IDE

To deploy the date application with NetBeans IDE, follow these steps:
1. Start the Application Server.
2. In NetBeans IDE, select File
Open Project.
3. In the Open Project dialog, navigate to:
tut-install/javaeetutorial5/examples/web/
4. Select the date folder.
5. Select the Open as Main Project check box.
6. Click Open Project Folder.
7. In the Projects tab, right-click the date project, and select Deploy Project.
To deploy the date application with the Ant tool, follow these steps:
1. In a terminal window, go to tut-install/javaeetutorial5/examples/web/date/.
2. Type ant. This command will spawn any necessary compilations, copy files to the
tut-install/javaeetutorial5/examples/web/date/build/ directory, and create a WAR
file.
3. Start the Application Server.
4. Type ant deploy.
To run the example, do the following:
1. Set the character encoding in your browser to UTF-8.
2. Open your browser to http://localhost:8080/date.
3. You will see a combo box whose entries are locales. Select a locale and click Get Date. You
will see the date expressed in a manner appropriate for that locale.
Some of the characters might not display properly if you don't have the appropriate language
files installed on your machine. Consult the user guide or online help for your operating system
to determine how you can install these language files.
The Example JSP Pages
To illustrate JSP technology, this chapter rewrites each servlet in the Duke's Bookstore
application introduced in
"The Example Servlets" on page 100
as a JSP page (see
Table 5­1
).
The Example JSP Pages
The Java EE 5 Tutorial · September 2007
136