If you did not do a previous tutorial, then create a web application named Tutorials in NetBeans. Review the web page that contains instructions on creating a servlet in a NetBeans project: Creating a Project in NetBeans
For the Tutorials project:
If you did Extra Credit 1 or Extra Credit 2, then add this tutorial to the same Tutorials project. Previous extra credit assignments should remain intact in the web application. There will be several links in the index page, one to each extra credit you have done.
If you had errors in any of the previous tutorials, fix them, so that you do not lose points again for old mistakes.
There are more detailed instructions for the tutorial on the book's web site, and a video on my class page.
Implement the Default Validate Controller in the Tutorials web application. It must work exactly like the example from Chapter 3 of the book.
RequestDataDefault.java
and Controller.java
in the ch3.defaultValidate
package
in the Source Packages folder in NetBeans. ch3/dataBean
folder in the
Web Pages folder in NetBeans. These pages are being reused from an
earlier example.
Controller
class. Names are case-sensitive. When you are done with everything, your directory and file structure should
look like this.
Be sure that your NetBeans project is configured so that .java files are added to the WAR file: Adding .java files to a WAR file
Clean and Build your web application. After doing this, navigate to the WAR file in NetBeans and verify that the .java files are included: View WAR File
In the operating system (not in NetBeans) navigate to the dist folder in the NetBeans project.
Deploy the WAR file on ocelot: Deploy a WAR File.
In the index.jsp file in the ROOT web app on ocelot, add a hypertext link to the Tutorials web app. Use a relative reference.
To hand in the assignment, zip the cgs4854 directory on ocelot and upload it.
zip -r username ~/cgs4854 -x \*.jar \*.zip \*.war
~downeyt/public/webftp/webftp.pl
Be sure that all your files and subdirectories are included in the zip
file.
After uploading, do not modify your files on ocelot until after your assignment
has been graded.