9.16.1 Setting method
If an error occurs at the following points of time, specify whether to report the error and cancel the starting process of J2EE applications:
-
When an error occurs in the initialization process of servlets or JSPs to be loaded (<load-on-startup> is specified), when starting the J2EE application.
-
When error occurs during tag library analysis.
- Organization of this subsection
(1) Attribute file to be edited
WAR attribute file
(2) Acquiring the attribute file to be edited and setting the attributes
-
Acquiring the attribute file
Execute the following command to acquire the following WAR attribute file:
- Execution format
cjgetappprop [server-name] [-nameserver provider-URL] -name J2EE application-name -type war -resname WAR-display-name -c path-of-the-WAR-attribute-file
- Example of execution
cjgetappprop MyServer -name account -type war -resname account_war -c C:\home\account_war.xml
-
Setting the attributes
Execute the following command to apply the values of the WAR attribute file:
- Execution format
cjsetappprop [server-name] [-nameserver provider-URL] -name J2EE application-name -type war -resname WAR-display-name -c path-of-the-WAR-attribute-file
- Example of execution
cjsetappprop MyServer -name account -type war -resname account_war -c C:\home\account_war.xml
(3) Attribute settings to be edited
The following table describes the error notification settings for a WAR that contains servlets or JSPs:
Item |
Mandatory |
Corresponding tag |
---|---|---|
Scope of error notification when starting |
O |
<start-notify-error> |
(4) Notes
-
Scope of error notification settings when the initialization of the Web application fails
In the J2EE server mode, you can set whether to continue the starting process of the J2EE application or whether to report the error and cancel the starting process of the J2EE application when initialization of the Web application fails. However, if an error occurs that requires the Web application to be disabled, you cannot specify the error notification settings. Regardless of the error notification settings, the starting process of the J2EE application is cancelled.
The failure in the initialization of the Web application and the scope of error notification settings will be explained here. The following table describes the errors that occur during the initialization of the Web application and the feasibility of specifying the error notification settings of whether to continue the starting process of the J2EE application or to cancel the process as an error:
Table 9‒5: Description of failure in the initialization of the Web application and the scope of error notification settings Items
Description of initialization failure in the Web application
Scope of error notification settings
Temporary directory for JSP
When the generation of the directory fails because there is no permission to access the temporary directory for JSP.
No
When the deletion of the directory fails because there is no permission to access the temporary directory for JSP.
Yes
web.xml
When an error occurs in the analysis of web.xml.
No
Filter
When a filter class specified in the filter-class element of web.xml or a class on which the filter class depends cannot be found.
No
When the following invalid filter classes are specified in the filter-class element of web.xml:
-
Class that does not implement javax.servlet.Filter interface
-
Class that does not have a constructor that does not take an argument
No
When an exception occurs during the initialization of the filter class.
No
Listener
When the listener class specified in the listener-class element of web.xml or a class on which the listener class depends cannot be found.
No
When the following invalid listener classes are specified in the listener-class element of web.xml:
-
Class that does not implement any of the following interfaces:
javax.servlet.ServletContextListener
javax.servlet.ServletContextAttributeListener
javax.servlet.ServletRequestListener
javax.servlet.ServletRequestAttributeListener
javax.servlet.http.HttpSessionListener
javax.servlet.http.HttpSessionAttributeListener
-
Class that does not have a constructor that does not take an argument
No
When an exception occurs during the initialization of the listener-class.
No
Servlet that specifies <load-on-startup> in web.xml
When the servlet class specified in the servlet-class element of web.xml or a class on which the servlet class depends cannot be found.
Yes
When an exception occurs during the initialization of the servlet.
Yes
JSP that specifies <load-on-startup> in web.xml
When the JSP file specified in the jsp-file element of web.xml cannot be found.
Yes
When a Java source file cannot be generated from JSP because there is no permission to create the subdirectory in the temporary directory for JSP
Yes
When a Java source file cannot be generated from JSP because there is no permission to access the subdirectory of the temporary directory for JSP
Yes
When an error occurs when generating a Java source file from JSP.
Yes
When an error occurs in the compilation of the source code of the servlet generated from JSP.
Yes
In the Web applications prior to Servlet2.3, when taglib is not mapped to the <taglib> tag of web.xml and absolute URI is specified in the uri attribute of the taglib directive of JSP.
Yes
When an error occurs during the analysis of the JSP document.
Yes
When an exception occurs during the initialization of JSP.
Yes
Tag library
(When executed using the extension of JSP that specifies <load-on-startup>)
When the TLD file cannot be read.
Yes
When an error occurs during the analysis of the TLD file.
Yes
When the tag library validator class or a class on which the tag library validator class depends cannot be found.
Yes
When the following invalid tag library validator data classes are specified:
-
Class that does not inherit javax.servlet.jsp.tagext.TagLibraryValidator class
-
Class that does not have a constructor that does not take an argument
Yes
When an exception occurs during the initialization of the tag library validator class.
Yes
When an exception occurs during the verification of JSP due to the tag library validator.
Yes
When TagExtraInfo class or a class on which the TagExtraInfo class depends cannot be found.
Yes
When an invalid TagExtraInfo class is specified. An invalid TagExtraInfo class indicates a class specified in the Tei-class element or teiclass element and matches with one of the following conditions:
-
TagExtraInfo class is not inherited
-
Is an interface and abstract class
-
Does not have a public constructor
Yes
When an exception occurs during the initialization of a class specified in tei-class element or teiclass element of TLD file.
Yes
When the tag library validator class reports an error found during the verification of a JSP page.
Yes
When the TagExtraInfo class reports an error found during the verification of attributes.
Yes
When an exception occurs during the verification of attributes by the TagExtraInfo class.
Yes
When the class defined in the function-class element of the TLD file cannot be found.
Yes
When an exception occurs while the class defined in the function-class element of the TLD file is being loaded.
Yes
When a parameter class defined in the function-signature element of the TLD file cannot be found.
Yes
When a method defined in the function-signature element of the TLD file cannot be found.
Yes
When an exception occurs at the time of loading the parameter class defined in a function-signature element of a TLD file or when accessing the class specified in a function-class element.
Yes
When the class defined in the type element of the TLD file cannot be found.
Yes
When an exception occurs while the class defined in the type element of the TLD file is being loaded.
Yes
-