O'Reilly logo

Head First Servlets and JSP, 2nd Edition by Bert Bates, Bryan Basham, Kathy Sierra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Compile, deploy, and test the final app!

In this chapter we’ve built an entire (albeit tiny) MVC application using HTML, servlets and JSPs. You can add this to your resume.

Compiling the servlet

We’ll use the same compiler command that we used earlier:

image with no caption

Deploying and testing the web app

Now it’s time to redeploy the servlet.

1 - Move a copy of the servlet’s .class file to ../Beer-v1/WEB-INF/classes/com/example/web/ (again, this will replace the previous version two class file).

3 - Shutdown and restart tomcat

image with no caption

4 - Test the app via form.html

image with no caption

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required