JSF的简介
JavaServerFaces
是2004年SUN推出的一个规范,也是基于MVC的一种架构
Struts2是基于标准的HTTP请求响应
的模式,而JSF是基于事件
的一种编程模型
JSF中页面表单的每一个输入域都绑定到后台backingbean
中对应的属性上
JSF也是基于Web的
,属于JSP跟Servlet层次,所以使用Tomcat即可运行
而无需借助类似于WebLogic、JBoss、GlassFish
之类的应用服务器
JSF的实现
比较有名的是Apache的MyFaces
,它提供了更多的组件,也是比较成熟的
使用MyFaces
可以满足日常所需的绝大多数功能的需求,比较全面
JSF与ASP.NET
SUN之所以推出JSF
,其实很大程度上是模仿了微软的ASP.NET
编写JSF时也是通过标签来引入相应元素
,例如填写完表单内容后点击提交按钮
它就会执行与提交按钮所绑定的事件所对应的方法
因此从这点来说,JSF跟ASP.NET是异曲同工的
它们都是将期望的原始的Web开发方式转化成接近于桌面应用的开发方式
下面是JSF应用的简单示例
首先是web.xml文件
然后是faces-config.xml文件
接着是index.jsp页面
接着是login.jsp页面
接着是success.jsp页面
最后是ManagedBean
分享到:
相关推荐
You’ll see the new and exciting ways JSF applications can use to communicate between a client and a server, such as using WebSockets, invoking bean methods directly from Ajax, executing client-side ...
Next, you'll learn how to use JSF in the real world by uncovering the various pieces of the JSF component model, such as UI components, events and validation. The authors then explain how to apply ...
Proven solutions, hints, tips, and “how-tos” show you how to use JSF effectively in your development projects Core JavaServer™ Faces, Third Edition, provides everything you need to master the ...
Pro JSF and HTML5 shows you how to leverage the full potential of JavaServer Faces JSF and HTML5 This book is for Java developers who aspire to build sophisticated enterprise grade web experiences ...
Master the Java EE 8 and JSF (JavaServer Faces) APIs and web framework with this practical, projects-driven guide to web development. This book combines theoretical background with a practical ...
Work with the different ways of mapping requests to JSF, make your application use extensionless URLs, and programmatically inspect which resources are present in your application Master the best ...
Proven solutions, hints, tips, and “how-tos” show you how to use JSF effectively in your development projects Core JavaServer™ Faces, Third Edition, provides everything you need to master the ...
Pro JSF and HTML5 shows you how to leverage the full potential of JavaServer Faces (JSF) and HTML5. This book is for Java developers who aspire to build sophisticated, enterprise-grade web experiences...
Apress - Beginning Jsp Jsf And Tomcat Web Development From Novice To Professional (2007).pdf
You’ll learn to create and enhance an eShop using practical methods, and can repurpose the template for your own personal and professional projects. What you’ll learn Get started with the new JSF 2...
用eclipse 开发 JSF and MyFaces 类库
jsf 分页 jsf 分页 jsf 分页 jsf 分页
jsf实例 JSF学习 JSF jar包 JSF jsf实例 JSF学习 JSF jar包 JSFjsf实例 JSF学习 JSF jar包 JSF jsf实例 JSF学习 JSF jar包 JSF
The Definitive Guide to JSF in Java EE 8 Building Web Applications with JavaServer Faces 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书
Beginning JSP,JSF and Tomcat 书中源码 Beginning JSP,JSF and Tomcat 书中源码
JSF中文教程JSF中文教程JSF中文教程JSF中文教程
JSF是一种用于构建Java Web 应用程序的标准框架(是Java Community Process 规定的JSR-127标准)。JSF(Java Server Faces)技术为开发基于网络用户界面的Java开发者提供了标准的编程接口API以及标签库。就像Struts框架...
《JSF_实战》非常好的JSF学习书《JSF_实战》非常好的JSF学习书《JSF_实战》非常好的JSF学习书《JSF_实战》非常好的JSF学习书《JSF_实战》非常好的JSF学习书《JSF_实战》非常好的JSF学习书《JSF_实战》非常好的JSF...
Put JSF to work