InfoCenter Home >
6: Administer applications >
6.6: Tools and resources quick reference >
6.6.10: Administering JSP files (overview)

6.6.10: Administering JSP files (overview)

The IBM WebSphere Application Server administrator should know the following about administering JSP files.

Enable JSP handling at the Web application level

  • The ability of the product to serve JSP files is controlled at the Web application level. It is quite simple: If a Web application contains a JSP enabler servlet, the Web application can handle requests for JSP files.

  • WebSphere Application Server provides the JSP enabler servlets. There is one for each supported JSP specification level. The "full" InfoCenter provides additional documentation about them.

  • The administrator is responsible for permanently adding JSP enablers to Web applications requiring the ability to handle JSP requests:

    • A Web application can contain zero or one JSP enablers.
    • A Web application cannot contain more than one JSP enabler.
    • A Web application that does not need to serve JSP files can contain zero JSP enablers.
JSP-enabled Web applications look at all JSP requests
  • By default, JSP enablers allow a Web application to consider all JSP requests (*.jsp) directed to the particular Web application.
  • To restrict the attention of the Web application only to particular JSP files (instead of *.jsp), the administrator can remove the Web application Web path specifying *.jsp and replace it with Web paths specifying particular JSP files by name.
Place JSP files and configure Web applications to find them

  • For the Web application to fulfill a JSP request, the requested JSP file must be in the document root of the Web application, or in a subdirectory of the document root, allowing the Web application to find it.
  • If a JSP file depends on other files, such as servlets, JavaBeans, or the like, the files must reside in directories specified in the classpath setting of the Web application.

    Alternatively, the resources can be specified in a more general classpath, such as that of the administrative server pertaining to the domain containing the Web application. See the Related information for details.

New in Fix Pack 2  JSP reloading for JSP 1.0 Web applications

Please note that the following parameters apply only to JSP 1.0 Web applications. They cannot be used for JSP 1.1 or JSP .91 Web applications.

You can configure how often each web application on the WebSphere Application Server will look for revised JSP files that need to be recompiled. By default, the Application Server will check for the presence of a class file every time a JSP is called, and compile the class file if one doesn't already exist. For performance purposes, you may wish to disable this check entirely or only after the JSP is called for the first time. Additionally, you may wish configure the amount of time between checks.

Recall, To specify how you want this done for each Web application, specify these Init Parameters for the JSP Enabler servlet of the Web application:

  1. checkjspfiles
  2. This attribute has three possible values:

    • "true" (or "always") - this will cause the Application Server to check for the presence of a class file each time the JSP is called or each X number of milliseconds specified in the reloadinterval below.
    • "firsttime" - the Application Server will check for the presence of the class file only once: when it is called for the first time.
    • "false" (or "never") - the Application Server will never check for the class file (you must ensure that a class file already exists for the JSP to work properly).
  3. reloadinterval
  4. The number of milliseconds between each check. This variable only works when you have selected "true" (or "always") as the value for checkjspfiles above.

Go to previous article: Property files pertaining to servlets Go to next article: JSP file properties

 

 
Go to previous article: Property files pertaining to servlets Go to next article: JSP file properties