What Is a JavaServer Faces Application?
For the most part, a JavaServer Faces application is like any other Java web application. A typical JavaServer Faces application includes the following pieces:
-
A set of JSP pages (although you are not limited to using JSP pages as your presentation technology)
-
A set of backing beans, which are JavaBeans components that define properties and functions for UI components on a page
-
An application configuration resource file, which defines page navigation rules and configures beans and other custom objects, such as custom components
-
A deployment descriptor (a web.xml file)
-
Possibly a set of custom objects created by the application developer. These objects might include custom components, validators, converters, or listeners.
-
A set of custom tags for representing custom objects on the page
A JavaServer Faces application that includes JSP pages also uses the standard tag libraries defined by JavaServer Faces technology for representing UI components and other objects on the page.
JSF是什么?
大体上,JSF跟其他JavaWeb很像。一个典型的JSF包括下面几部分:
- JSP页面(或其他页面技术)
- 托管Bean,定义页面UI组件的属性和方法
- 配置文件,定义页面导航规则和配置bean和其他
- web.xml
- 自定义objects,含有自定义组件,验证器,转换器和监听器
- 自定义标签
JSF定义的标准标签库