Packages and directories for generated .java and .class files

By default, the .java files for all JavaServer Pages (JSP) files are generated with the package statement, package com.ibm._jsp;. The JSP engine's class loader knows how to load JSP classes when they are all in the same package. The .java files are located in the filesystem within a directory structure mirroring the JSP source directory structure.

If the JSP engine configuration parameter useFullPackageNames is set to true, the .java files are generated with the package statement

Package _ibmjsp.<directory structure in which the jsp is located>;
The usage of full package names enables the configuration of a JSP as a servlet in the web.xml file. See JSP class loading for more information. The table below gives examples of packages and directory structures for generated .java and .class files.

  Java package Location of .java or .class files in file system
JSP file default useFullPackageNames=true default useFullPackageNames=true
/myJsp.jsp com.ibm._jsp _ibmjsp / /_ibmjsp
/jspFiles/jspOne.jsp com.ibm._jsp _ibmjsp.jspFiles /jspFiles /_ibmjsp/jspFiles
/dir with spaces/jspTwo.jsp com.ibm._jsp _ibmjsp.dir_20_with_20_spaces /dir with spaces /_ibmjsp/dir_20_with_20_spaces

 

See also


Generated .java files

 

See Also


JavaServer Pages
JSP class loading
JSP engine

 

See Also


JSP class file generation

 

Related Information