web.xml Visual Editor: JSP Property Groups

Use the JSP Property Groups section to add, remove, and view a web application's JSP property groups. A JSP property group is a set of properties defined for a group of JSP files within a web application.

In the Visual Editor, click Pages at the top of the editor to open the Pages view. Click the JSP Property Groups header to open the JSP Property Groups section.

First, click Add JSP Property Group to define the JSP property group with the following properties:

Element Description

Display Name

Specifies the group's display name, such as Bookstore

Description

Specifies a description, such as All JSP files in Bookstore component

URL Pattern(s)

Specifies the group of JSP files that will use the properties, such as bookstore/*.jsp. You can specify more than one URL pattern. Note that all the properties in the group apply to the JSP files that match any of the URL patterns. If a JSP file matches URL patterns in more than one group, the pattern that is most specific applies.


After you click OK, you can define the following properties for the group:

Element Description

Page Encoding

Specifies the page encoding for all the JSP files in the group. Valid values are the same as those used by the pageEncoding attribute of an individual JSP file's page directive. A translation-time error results if you define the page encoding with one value in the JSP property group and then give it a different value in an individual JSP file's pageEncoding directive.

Ignore Expression Language

Overrides the default expression language (EL) evaluation mode for all the JSP files that belong to the group. The default value varies depending on the version of the web.xml file. The default mode for JSP files delivered using a Servlet 2.3 or earlier web.xml file is to ignore EL expressions; this provides backwards compatibility. The default mode for JSP files delivered with a Servlet 2.4 web.xml file is to evaluate EL expressions; this automatically provides the default that most applications want. EL expressions that are not evaluated are treated as regular text.

Disable Scripting

Invalidates scripting for all the JSP files that belong to the group. By default, scripting in JSP files is valid. Since scripting can make pages difficult to maintain, you may want to invalidate it. When scripting is invalid, scriptlets, scripting expressions, and declarations will produce a translation error if present in any of the pages in the group.

XML Syntax

Specifies that all JSP pages in the group are JSP documents, instead of JSP files. This means that they use JSP document syntax, instead of standard JSP syntax.

Trim Directive Whitespaces

Eliminates the extra white space from the page.

Deferred Syntax Allowed as Literal

Controls whether the character sequence #{ is allowed when used as a String literal.

Include Preludes (Headers)

Specifies the headers and footers implicitly included by all the JSP files in the group, such as /template/header.jspf and /template/footer.jspf. The values of headers and footers are context-relative paths that must correspond to elements in the web application. When the elements are present, the given paths are automatically included (as in an include directive) at the beginning and end of each JSP page in the property group respectively. When there is more than one header or footer element that belong to the group, they are included in the order they appear. When more than one JSP property group applies to a JSP page, the corresponding elements will be processed in the same order as they appear in the group.

Include Codas (Footers)

Specifies the headers and footers implicitly included by all the JSP files in the group, such as /template/header.jspf and /template/footer.jspf. The values of headers and footers are context-relative paths that must correspond to elements in the web application. When the elements are present, the given paths are automatically included (as in an include directive) at the beginning and end of each JSP page in the property group respectively. When there is more than one header or footer element that belong to the group, they are included in the order they appear. When more than one JSP property group applies to a JSP page, the corresponding elements will be processed in the same order as they appear in the group.



Related Topics

Developing Applications with NetBeans IDE,

Developing Applications with NetBeans IDE,

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.