JSPs
JSPs (JSP) are application components coded to the JSPs Specification. JSPs enable the separation of the Hypertext Markup Language (HTML) code from the business logic in web pages so that HTML programmers and Java programmers can more easily collaborate in creating and maintaining pages.
JSP files support a division of roles:
- HTML authors
- Develop JSP files that access databases and reusable Java components, such as servlets and beans.
- Java programmers
- Create the reusable Java components and provide the HTML authors with the component names and attributes.
- Database administrators
- Provide the HTML authors with the name of the database access and table information.
WebSphere Application Server v8.5 supports the JSP 2.1 specification.
Subtopics
- JSP class file generation
At runtime, the WAS JSPs (JSP) engine loads JSP class files from either the WAS temp directory or a web module's WEB-INF/classes directory. The JSP engine first searches for a class file in the temp directory and then it searches in the web module's WEB-INF/classes directory.
- 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.
- JSP class loading settings
We can configure a JSPs (JSP) class to be loaded by either the JSP engine's class loader or by the web module's class loader.
- JSPs (JSP) runtime reloading settings
JSPs files can be translated and compiled at run time when the JSP file or its dependencies are modified. This is known as JSP reloading.
- JSP and JSF option settings
Use this page to configure the class reloading of web modules such as JSPs and to select a JSF implementation to use with this application.
- JSP run time compilation settings
By default, the JSPs (JSP) engine translates a requested JSP file, compiles the .java file, and loads the compiled servlet into the run time environment. We can change the JSP engine default behavior by indicating that a JSP file must not be translated or compiled at run time, even when a .class file does not exist.
- Provide options to compile JSPs settings
Use this page to specify options to be used by the JSPs (JSP) compiler.
- JSP batch compilation
As an IBM enhancement to JSPs (JSP) support, IBM WebSphere Application Server provides a batch JSP compiler that allows JSP page compilation before application deployment. The batch compiler validates the syntax of JSP pages, translates the JSP pages into Java source files, and compiles the Java source files into Java servlet class files. The batch compiler also validates tag files and generates their Java implementation classes.
- Global tag libraries (deprecated)
JSPs (JSP) tag libraries contain classes for common tasks such as processing forms and accessing databases from JSP files.
- JSPs specific web container custom properties
We can configure name-value pairs of data, where the name is a property key and the value is a string value that we can use to set internal system configuration properties. We can define a new property to configure a setting beyond what is available in the console.
Related tasks
Configure JSP engine parameters Migrate web application components from WebSphere Application Server Version 5.x
Web applications: Resources for learning JSPs troubleshooting tips
Related information:
JSR-000245 JSPsTM 2.1