首先创建一个普通的webproject,然后看官网教程喽 https://www.genuitec.com/products/myeclipse/learning-center/web/myeclipse-jsf-development-overview/

配置开发环境JSF Development in MyEclipse



1.  JSF Support for Web Projects

Before creating a JSF project, you must have an existing  MyEclipse Web Project. Add the JSF facet to the project to give it JSF support. JSF  Support includes a configured web.xml, generated faces-config.xml, and all necessary JSF run-time libraries.

Note: JSF 2.0 and higher does not require the faces-confix.xml file. Regardless, the file is generated in the project and can be used for configuration.

When a JSF facet is installed, the following occurs:

  • If the project's target server does not provide JSF support by default, your selected JSF libraries are added to the build classpath and are automatically selected for deployment.
  • The project's Web deployment descriptor (web.xml) is updated ensuring that the Faces Servlet is present along with your specification for:
    • Faces Servlet Name
    • Faces Servlet URL Mappings
    • Context Params for the application configuration file
  • An empty Faces configuration file using the specified name and location is created. If a file with that name already exists at that location, this step is skipped.

The project should have the JSF implementation JAR files in its classpath for JSF design-time support to work correctly. This can be configured by right-clicking the project, selecting Properties, expanding MyEclipse>Project Facets, and selecting Java Server Faces. If your target server provides JSF libraries, select Provided by Target Runtime from the Type drop-down list. Otherwise, select MyEclipse Library or User Libraries. If you want to provide JARs on your own, you can select Disable Library Configuration.


1.1 Adding the JSF Facet

To add JSF Project support to an existing MyEclipse Web Project, select MyEclipse>Project Facets>Install JavaServer Faces Facet from the menu.

Adding JSF capabilities to Web project

The Install JavaServer Faces Facet wizard allows selection of the JSF implementation, config path, servlet name, and URL pattern. Optional support for facelets can also be added.

 

但是我的myeclipse2014只支持到 jsf1.2

Add JSF Facets window

When you click Finish, the Web project is configured with JSF runtime libraries, the web.xml is configured with the necessary configuration, and afaces-config.xml file is added to the project.

Initial JSF project contents


1.2 JSF Runtime Libraries

MyEclipse comes bundled with JSF implementations that  are configurable using the project-specific Project Facets preferences. To open the preferences, right-click the project, and select Properties from the menu. Expand MyEclipse>Project Facets, and select JavaServer Faces. You can change the library options, including selecting a user library instead of the MyEclipse library.

JSF runtime libraries


2. Visual Faces-Config Editor

MyEclipse has an advanced visual Faces Config editor as the default editor for faces-config.xml files. Double-click the file to open the MyEclipse JSF Config Editor, or right-click the file, and select Open With>MyEclipse JSF Config Editor from the menu. 


Opening the MyEclipse JSF Config Editor

The JSF Config Editor has multiple editing pages: the Navigation Rule, ManagedBean, Component, Others, and Source pages. Access the pages, by clicking the appropriate tab at the bottom of the view. See Modifying the JSF Configuration File.


3. New JSF Page Wizard

Add new JSF pages that use JSP by clicking the New icon  on the toolbar, expanding MyEclipse>Web, and selecting JSP (Advanced templates).

New JSP page using advanced template

After you click Next, select Default JSF template from the Template to use drop-down.

Selecting template to use


4. Facelets Support

For existing JSF projects using JSF specification version 1.2 or below, add Facelets support by selecting MyEclipse>Project Facets>Install Facelet Facet from the menu. Facelets support is already included when you add the JSF facet version 2.0 or higher.

 

Myeclipse2014配置JSF环境的更多相关文章

  1. 在 IntelliJ IDEA 中配置 JSF 开发环境的入门详解

    JSF 作为 JavaEE 官方标准,在了解并掌握其基本开发技术后,对于功能要求较高.业务流程复杂的各种现代 Web 应用程序开发将会成为非常合适且强大的高效率开发利器.JSF 的开发环境搭建涉及到在 ...

  2. Linux CentOS 配置Tomcat环境

    一.下载Tomcat 下载Tomcat方式也有两种,可以参考我的前一篇博文Linux CentOS配置JDK环境,这边就不再赘述. 二.在Linux处理Tomcat包 1.创建tomcat文件夹 mk ...

  3. Linux CentOS 配置JDK环境

    一.下载JDK 下载JDK的方式有两种: 1.Linux中使用wget下载 1.使用命令安装wget yum install wget 2.下载 wget 'http://download.oracl ...

  4. IIS8 使用FastCGI配置PHP环境支持 过程详解

    平时帮朋友们配置过一些PHP环境的服务器,但是一直使用的都是Apache HTTP+PHP,今天呢,我吧IIS+PHP配置方式给大家发一下下~呵呵. 在这里,我使用的是FastCGI模块映射的方式配置 ...

  5. sublime text 3 快捷键大全以及配置编译环境

    Sublime text 3是码农最喜欢的代码编辑器,每天和代码打交道,必先利其器,掌握基本的代码编辑器的快捷键,能让你打码更有效率.刚开始可能有些生疏,只要花一两个星期坚持使用并熟悉这些常用的快捷键 ...

  6. CentOS下配置java环境变量classpath

    一. 需要配置的环境变量1. PATH环境变量.作用是指定命令搜索路径,在shell下面执行命令时,它会到PATH变量所指定的路径中查找看是否能找到相应的命令程序.我们需要把 jdk安装目录下的bin ...

  7. Ubuntu中配置Java环境变量时,出现command not found问题解决记录

    百度出Ubuntu中配置Java环境变量时,在利用sudo gedit /etc/profile 对profile编辑后, 在terminal中输入 sudo source /etc/profile, ...

  8. win7系统下如何配置php-Apache-mysql环境

    如何在win7系统下配置php环境呢,php+Apache+mysql都是在配置过程中必不可少的元素,php负责解析php代码,apache负责服务器端而mysql是数据交互的中转站. 那么如何将ph ...

  9. Slackware Linux or FreeBSD 配置中文环境。

    配置中文环境. Slackware Linux 如果在控制面板的语言与地区选项中没有找到中文,那说明在安装系统选择软件的时候没有将国际语言支持包选上,可以从slackware的安装盘或ISO文件中提取 ...

随机推荐

  1. JS中的forEach、$.each、map方法

    forEach是ECMA5中Array新方法中最基本的一个,就是遍历,循环.例如下面这个例子: [1, 2 ,3, 4].forEach(alert); 等同于下面这个for循环 var array ...

  2. 安装Windows7出现:”安装程序无法创建新的系统分区 也无法定位系统分区“ 终极解决方案

    参考:地址 解决方法: 1.先格式化一下你要装的那个盘,然后,拔出U盘,啥也别动,只拔出U盘就行,再装上U盘,然后刷新一下[选硬盘那里的高级选项中有格式化和刷新],再选择要安装的硬盘点下一步,OK了, ...

  3. Careercup - Microsoft面试题 - 5428361417457664

    2014-05-11 03:37 题目链接 原题: You have three jars filled with candies. One jar is filled with banana can ...

  4. 快逸报表部署 (一)-- demo连接mysql数据库

    1. 设计器连接mysql数据库, 创建first.raq报表文件 2. 创建demo.jsp,嵌入报表,jsp顶部加入下面两行 <%@ page contentType="text/ ...

  5. 安装Symfony2

    我就不明白这个框架明明很小就几M,为什么这么难下载. 他们为什么不把文件打包好?非要搞得这么复杂. 一开始我在Linux ubuntu下载没有成功 然后想在win10上试试 到www.apache.o ...

  6. 项目部署之VPN+端口映射

    背景:出差开发项目,需要在客户那里部署基本成型的系统.这套系统需要一个公网的ip地址(一个后台管理系统,使用花生壳提供域名服务.一个公网的tcp server,java io实现),但是客户那里无法提 ...

  7. JS学习笔记-1--基本知识和注意事项

    1.JS开始的目的主要是验证表单的输入验证 2.是一种具有面向对象能力的.解释型语言.是基于事件驱动的相对较安全的客户端脚本语言 3.JS 特点:松散型:变量不具备一个明确的类型:   对象属性:把属 ...

  8. Mrt render

    mutil render target Pixel shder输出一个结构体 Out.f4Color Out.f4Normal 这步在渲染物体的shader里 在application setcolo ...

  9. nodeJs 初探 ~

    今天晚上,开始时间了一下nodejs,跟着 Node入门 一步步的往下走.对node开发也有了初步的了解. 期间没有碰到什么问题,只有在最后的时候,碰到了几个问题.在这里记录一下: 1 . cross ...

  10. Unity3D研究院之静态自动检查代码缺陷与隐患

    原地址:原地址:http://www.xuanyusong.com/archives/2828 代码缺陷和代码错误的最大区别是,代码缺陷不影响游戏编译,而代码错误编译都不通过.但是代码缺陷会影响游戏发 ...