JSF的库(Sun / Oracle Mojarra) [英] libraries for JSF (Sun/Oracle Mojarra)

查看:106
本文介绍了JSF的库(Sun / Oracle Mojarra)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从 http://javaserverfaces.java.net/download下载JSF的Sun / Oracle Mojarra实现.html

我下载了最新的-2.1.9二进制文件。它只有一个jar - javax.faces-2.1.9.jar。
我有一个示例项目,我相信它使用的是旧版本2.0,其中包括2个罐子 - jsf-api.jar和jsf-impl.jar。

I downloaded the latest -2.1.9 binary. It comes with only one jar - javax.faces-2.1.9.jar. I had a sample project which I believe is using the older 2.0 version, which includes 2 jars - jsf-api.jar and jsf-impl.jar.

我用一个新的罐子替换了那两个旧罐子。看起来样本项目仍然运作良好。

I replaced those 2 older jars with the single new jar. It seems like the sample project still works well.

我的问题:


  1. 还有什么我需要的除了更换那些2个罐子之外???

  1. Is there anything else I need to do besides replacing those 2 jars???

任何特殊原因这是从2罐改为1?

Any special reason this is this changed from 2 jars to 1?

非常感谢。

更多:

我注意到我的faces-config.xml中的版本

I noticed versions in my faces-config.xml

<?xml version="1.0"?>
<faces-config xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee  http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" version="2.0">
</faces-config>

我将2.0和2_0更改为2.1和2_1。示例项目仍然有效。我应该做出这些改变吗?

I changed 2.0 and 2_0 to 2.1 and 2_1. The sample project still works. SHould I make these changes?

推荐答案


除了我还需要做什么更换这2个罐子?

否。


任何特殊原因这是从2个罐变为1个?

在2.1.6发布之前,他们重构了构建系统符合Java EE Maven规则。另请参见 Mojarra issue 2028 。这导致两个众所周知的 jsf-api.jar jsf-impl.jar 文件被单个替换 javax.faces.jar file。

Around the time of the release of 2.1.6, they've refactored the build system conform Java EE Maven rules. See also Mojarra issue 2028. This resulted in the two well known jsf-api.jar and jsf-impl.jar files being replaced by a single javax.faces.jar file.


我将2.0和2_0更改为2.1和2_1。示例项目仍然有效。我应该做出这些改变吗?

你可以这样做。唯一的区别是 faces-config 2.1 XSD 定义了两个新元素,而不是 faces-config 2.0 XSD

You can just do so. The only difference is that the faces-config 2.1 XSD definies two new elements as opposed to faces-config 2.0 XSD:


  • < facelet-cache-factory> 注册自定义 FaceletCache

  • < redirect-param> ; 在重定向导航案例中指定请求参数。

  • <facelet-cache-factory> to register a custom FaceletCache
  • <redirect-param> to specify request parameters for in a redirect navigation case.

如果您不需要任何他们,如果你使用的是2.0或2.1 XSD则没关系。当使用JSF 2.1和2.0 XSD时,Mojarra 2.1内部没有2.0后备模式。

If you don't need any of them, then it don't matter if you're using the 2.0 or 2.1 XSD. Mojarra 2.1 has internally no 2.0 fallback modus when using JSF 2.1 with a 2.0 XSD.

这篇关于JSF的库(Sun / Oracle Mojarra)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆