What goes where in a web app

In several chapters of this book, we’ve looked at the locations in which the various files must be placed. In the chapter on custom tags, for example, you saw that Tag Files must be deployed in /WEB-INF/tags or a subdirectory, or in a JAR file under /META-INF/tags or a subdirectory. If you put a Tag File anywhere else, the Container will either ignore it or treat it as static content ready to be served.

The Servlet and JSP specs have a lot of picky rules about where things go, and you really do need to know most of them. Since we’ve already covered most of this in one way or another, we use these first few pages as a test of your memory and understanding. Don’t skip it! Treat these next few pages as practice exam questions!

image with no caption

What she really wants is a WAR file

The directory structure of a web app is intense. And everything has to be in exactly the right place. Moving a web app can hurt.

But there’s a solution, called a WAR file, which stands for Web ARchive. And if that sounds suspiciously like a JAR file (Java ARchive), that’s because a WAR is a JAR. A JAR with a .war extension instead of .jar.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset