If you did not do Tutorial 1, then create a web application named Tutorials in NetBeans.
If there is not a web.xml file in the WEB-INF folder, then select
New File -> Web -> Standard Deployment Desctiptor (web.xml)
from the NetBeans menu.
If you did Tutorial 1, then add this tutorial to the same Tutorials project from Tutorial 1. Tutorial 1 should remain intact in the web application. There will be two links in the index page, one to Tutorial 1 and the other to Tutorial 2.
Implement the Servlet Controller in the Tutorials web application. It must work exactly like the example from the book. Step-by-step instructions.
The JSPs must be in a subfolder named ch2/servletController under Web Pages in the Netbeans project.
The servlet must be in a package named ch2.servletController in the Source Packages in the Netbeans project.
Create a servlet definition and mapping for the servlet in the web.xml file.
Do not use the WebServlet
annotation for this tutorial.
Be sure that the index.jsp uses the HTML5 DOCTYPE and corresponding meta tag for the charset. Add a hypertext link in index.jsp to the URL for the controller. Use a relative reference from the current location.
Clean and Build your web application.
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
Create an index.jsp file in the ROOT web app on ocelot. Include all the standard tags for a web page. Add a hypertext link to the Tutorials web app. Use a reference that is relative to the current location. There will be two links in the index page, one to Tutorial 1 and the other to Tutorial 2. Be sure to validate the page for correct HTML.
Upload the WAR file to me: Submitting homework on-line via the Web.