+

Search Tips   |   Advanced Search

Packages and directories for generated .java and .class files

By default, the .java files for all JSPs 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

The usage of full package names enables the configuration of a JSP as a servlet in web.xml. Refer to the JSP class loading settings topic for more information. The table later in this section gives examples of packages and directory structures for generated .java and .class files.

Directory File name 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


Subtopics


Related concepts

  • JSP class file generation

  • JSP batch compilation

  • Global tag libraries (deprecated)
  • JSPs
  • JSP class loading settings
  • JSP engine

  • Web container configuration for JSPs static file access Concept topic