gpt4 book ai didi

jsf - FacesContext 有何用途?

转载 作者:行者123 更新时间:2023-12-03 07:25:03 24 4
gpt4 key购买 nike

FacesContext 有何用途?

它具体是在哪里实现的?

最佳答案

引自JSF 2.0 specification第6.1章:

FacesContext

JSF defines the javax.faces.context.FacesContext abstract base class for representing all of the contextual information associated with processing an incoming request, and creating the corresponding response.

A FacesContext instance is created by the JSF implementation, prior to beginning the request processing lifecycle, by a call to the getFacesContext method of FacesContextFactory, as described in Section 6.6 “FacesContextFactory”.

When the request processing lifecycle has been completed, the JSF implementation will call the release method, which gives JSF implementations the opportunity to release any acquired resources, as well as to pool and recycle FacesContext instances rather than creating new ones for each request.

它在类 javax.faces.context.FacesContext 中指定并在 Mojarra 中在类 com.sun.faces.context.FacesContextImpl 中实现并在类 org.apache.myfaces.context.servlet.FacesContextImpl 中实现的 MyFaces 中.

另请参阅:

关于jsf - FacesContext 有何用途?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5865353/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com