我正在使用Eclipse Oxygen 3.在配置JavaServer Faces方面时,可以选择的最高版本号是2.2.告诉Eclipse我使用2.3版的正确方法是什么?
告诉Eclipse我使用2.3版的正确方法是什么?
你不能.您基本上需要将Eclipse升级到更新的版本.但由于它还没有,它在这里结束.
现在,只需选择2.2并在之后编辑faces-config.xml
以指定2.3.它如下:
<?xml version="1.0" encoding="UTF-8"?>
<faces-config
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_3.xsd"
version="2.3">
<!-- Config here. -->
</faces-config>
Run Code Online (Sandbox Code Playgroud)
基本上就是这样.这是因为Eclipse只是一个代码编辑器,而JSF facet基本上指示Eclipse自动生成一些文件(例如faces-config.xml
)并安装FacesServlet
并向项目中添加JSF特定的构建器和验证器.换句话说,即使使用JSF 2.2方面,您也可以在Eclipse中开发,构建和运行JSF 2.3项目.
归档时间: |
|
查看次数: |
439 次 |
最近记录: |