When a JSP is compiled, a package is created for it. The package
name starts with jspc. For example, the generated package name
for ~/SOURCE/JSP/myjsps/hello.jsp is precompiled as jspc -webapp
~/SOURCE -d ~/test1/test2/test3. The generated servlet is
located in
~/test1/test2/test3/org/apache/jsp/JSP/myjsps/hello_jsp.java and
defined in org.apache.jsp.JSP.myjsps. The path for hello.jsp is
derived from the directory in which the JSP is located. In
another example, the same hello.jsp is precompiled using the —p
option, and is precompiled as jspc -webapp ~/SOURCE -d
~/test1/test2/test3 -p app1.app2.app3. The generated servlet is
located in
~/test1/test2/test3/app1/app2/app3/JSP/myjsps/hello_jsp.java and
defined inside package app1.app2.app3.JSP.myjsps. Note that the
package specified with the -p option (app1.app2.app3) overrides
the standard org.apache.jsp but does not affect the package
derived from the directory in which the JSP is located. Also,
note that the -d option does not affect on the generated package