In this chapter
You might have noticed that servlets and Java Server Pages don't mix well when it comes to naming. So far, most of the servlets you have used are accessed using the
/servlet/ prefix. The problem with that is, when the servlet needs to invoke a JSP, it must include the full pathname of the JSP. Although that might be fine for testing, in a real-world application, you shouldn't have to rewrite a JSP or a servlet just because you want to move your application to a different directory.
The servlet API defines a way for you to package together your JSPs, Java classes, and servlets ...