From the course: Jakarta EE Servlets

Unlock the full course today

Join today to access over 23,100 courses taught by industry experts.

Creating a WAR file

Creating a WAR file

- [Instructor] Throughout most of the course, we've leveraged Eclipse's builtin Tomcat integration to run our servlet application. This is okay for development purposes, however it's not a good option for deploying to a production server. The typical approach is to build our application source code and package it within a web application archive that gets deployed to the standalone servlet container. A web application archive or WAR file is similar to a JAR file that we would use to package a Java project into a library. The difference between the two is that the WAR packages web resources used by the application like servlets, Java Server Pages and HTML files into these predefined directories. That way, the Servlet container can find them. Let's go ahead and we'll package our H plus sport product catalog project into a WAR file. That way you can see what I'm talking about. So over in Eclipse, if you right click on your…

Contents