JavaServer Faces Note(2)

JavaServer Faces Note(2)
First and foremost, a JSF configuration file (faces-config.xml) is an XML document whose root node is .
1) You can declare one or more JavaBeans for use in your application in this file.
2) You can give each one a name, a description, and a scope, and you can even initialize its properties.
3) Objects declared in a configuration file are called managed beans.
Declaring navigation is as simple as declaring a managed bean. Each JSF application can have one or more navigation rules.
It's worthwhile to point out that some aspects of JSF configuration, particularly navigation, can be handled visually with tools.

All J2EE web application are configured with a web.xml deployment descriptor; Faces applications are no different.
However, JSF applications require that you specify the FacesServlet, which is usually the main servlet for the application.
In addition, requests must be mapped to this servlet.

Summary
JavaServer Faces is a UI framework for building Java web applications; it was developed through the Java Community Process(JCP) and will become part of Java 2 Enterprise Edition. One of the main goals of Faces is to bring the RAD style of application development, made popular by tools like Microsoft Visual Basic and Borland Delphi, to the world of Java Web applications.

JSF provides a set of standard widgets (buttons, hyperlinks, checkboxes, and so on), a model for creating custom widgets, a way to process client-generated events on the server, and excellent tool support. You can even synchronize a UI component with an object's value, which eliminates a lot of tedious code.

All JSF applications are built on top of the Servlet API, communicate via HTTP, and use a display technology like JSP. JavaServer Faces applications don't require JSP, though. They can use technologies like XML/XSLT, other template engines, or plain Java code. However, Faces implementations are required to provide basic integration with JSP.

The component architecture of Faces leverages JavaBeans for properties, fundamental tool support, an event model, and several other goodies. JSF is considered a web application framework because it performs a lot of common development tasks so that developers can focus on more fun things like business logic.

One of the key features is support of Model 2 design pattern, which enforces separation of presentation and business logic code. However, Faces focuses on UI components and events. As such, it integrates quite nicely with the other frameworks like Struts, and overlaps quite a bit with the functionality of higher-level frameworks.

[@more@]

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/301743/viewspace-927301/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/301743/viewspace-927301/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值