Installing NetBeans web plugins in CSc labs.

The CSc labs have NetBeans installed.  However, it is just the "vanilla" version,
without any of the plugins for web development.  These directions will
explain how to add the desired plugins to your account.

Login to Fedora.
From the menubar, select Applications -> Programming -> NetBeans

If it's your first time running NetBeans, a Registration Reminder dialog will appear,
which you may respond to as appropriate (probably "Never Register").

Select desired plugins

1. From the NetBeans menubar, select Tools -> Plugins
Wait a few seconds for the dialog to initialize.

2. Click the tab "Available Plugins".

3. Click the "Category" column to sort by category.

4. Scroll to the "Web & Java EE" plugins.
Check the following entries:
Visual JSF
Web Applications
Java EE
Spring Web MVC
Hibernate Support
Project Dynamic Faces Ajax Components
Java Blueprints Solutions Catalog

5. Click the button "Install".
Wait a few moments and when the "Next" button is enabled, click it.
Check agree to license agreement and click "Install".
Wait several minutes for the plugins to be download and validated.

6. Click "Finish" and NetBeans will close and restart.
Wait for NetBeans to update itself.

7. From a terminal window, use the "quota" command to verify you haven't exceeded your disk quota.

Configure the Server plugin

1. From the NetBeans menubar, Click Tools -> Servers
2. In the dialog which appears, in the lower left corner, click "Add Server"
3. From the list of servers, select "Tomcat 6.0" and click "Next".
4. In the Installation and Login Details panel,
Enter in the field "Catalina Home" the value "/home/jdalbey/Tomcat".
5. Check "Use Private Configuration Folder" and
    For the field "Catalina Base" click the "Browse" button and an Open File dialog appears.
    Click the "create new folder" icon, type "MyTomcat" into the text field,
    press Enter, click OK.
6. Enter the manager credentials:
    username: manager
    password: tomcat
7. Click "Finish" to return to the Servers dialog.  Tomcat should now appear in the panel on the left.

Creating a "Hello World" web application.

1. From the NetBeans menubar, click File -> New Project
The new project dialog appears.
2. Under "Choose Project" the Categories panel an item "Web" should appear.
3. Click "Web" in the Categories Panel and "Web Application" in the Projects panel.  Click Next.
4. Observe the default Name and Location and accept them by clicking "Next".
5. In the Server and Settings panel "Tomcat" should appear in the server field.
6. Click "Finish".
Netbeans will show "creating web application", and after a few moments, a Hello World web app source code appears.

Modifying and running the web application.

1. Locate the text "Hello World!" in the source code, and replace it with a message of your choice such as
"Hello Blue Planet Earth".
2. From the "Run" menu select "Run Main Project".
3. In the output panel, messages will appear indicating the code is being compiled and run.  Tomcat server will start.
After a few moments, the default web browser on your work station should open and a "Hello World" page is displayed.


You can exit NetBeans.

Miscellaneous notes.
Project Properties > compiling > Check "Test compile JSP"

add classes to a jar? Remove precompile JSP's to force Tomcat to recompile them?
cd dist
jar xvf JokeADay.war
rm *.jsp
cd WEB-INF/classes
cp -r ../../../build/generated/classes/*  .
cd ../..
jar cvf new.war  META-INF WEB-INF
mv new.war JokeADay.war