当前位置: 代码迷 >> JavaScript >> JSF中关于javax.faces.STATE_SAVING_METHOD的一个有关问题
  详细解决方案

JSF中关于javax.faces.STATE_SAVING_METHOD的一个有关问题

热度:559   发布时间:2012-11-19 10:18:51.0
JSF中关于javax.faces.STATE_SAVING_METHOD的一个问题?

看<JSF in Action>里讲JSF的生命周期时,有下面一段:
A view represents all of the components that make up a particular page. It can be
stored on the client (usually in a hidden field on a browser) or on the server (usu-
ally in the session).

意思是说:"在JSF中,一个视图代表着组成整个特定页面的组件,它可以被存储在客户端(通常以隐藏域的方式存在浏览器中),也可以存储到服务器上(通常以Session的方式.)"


存放在服务器上的情况先不考虑,对存放到client端的方法有些疑问,我看了下生成HTML的代码,其中是有一个element,它的内容如下:
?? ?<input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="rO0ABXVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAANzcgBHb3JnLmFwYWNoZS5teWZhY2VzLmFwcGxpY2F0aW9uLlRyZWVTdHJ1Y3R1cmVNYW5hZ2VyJFRyZWVTdHJ1Y3RDb21wb25lbnRGWRfYnEr2zwIABFsACV9jaGlsZHJlbnQASltMb3JnL2FwYWNoZS9teWZhY2VzL2FwcGxpY2F0aW9uL1RyZWVTdHJ1Y3R1cmVNYW5hZ2VyJFRyZWVTdHJ1Y3RDb21wb25lbnQ7TAAPX2NvbXBvbmVudENsYXNzdAASTGphdmEvbGFuZy9TdHJpbmc7TAAMX2NvbXBvbmVudElkcQB+AARbAAdfZmFjZXRzdAATW0xqYXZhL2xhbmcvT2JqZWN0O3hwdXIASltMb3JnLmFwYWNoZS5teWZhY2VzLmFwcGxpY2F0aW9uLlRyZWVTdHJ1Y3R1cmVNYW5hZ2VyJFRyZWVTdHJ1Y3RDb21wb25lbnQ7uqwnyBGFkKoCAAB4cAAAAAFzcQB+AAJ1cQB+AAcAAAAgc3EAfgACcHQAKWphdmF4LmZhY2VzLmNvbXBvbmVudC5odG1sLkh0bW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AAAAAHcQB+AFhwcQB+AIBwc3EAfgBzP0AAAAAAAAx3CAAAABAAAAABcQB+AHhxAH4Aenhwc3EAfgBzP0AAAAAAAAF3CAAAAAIAAAABcQB+AINzcQB+AIRxAH4AiXEAfgCKeHBwcHBwcHBwdXEAfgAAAAAAA3VxAH4AAAAAAAh1cQB+AAAAAAAcdXEAfgAAAAAABXVxAH4AAAAAAAdxAH4AW3B0ABdvcmcuYXBhY2hlLm15ZmFjZXMuTGlua3QAHmFkZEVkaXRBcnRpc3RQcm9wZXJ0eTpfaWRKc3AxOHNxAH4Acz9AAAAAAAAMdwgAAAAQAAAAAXEAfgB4cQB+AHp4cHBzcQB+AIRxAH4BnnVxAH4AAAAAAAJ0ACgje2F1dGhlbnRpY2F0aW9uQ29udHJvbGxlci5hdXRoZW50aWNhdGV9cHBxAH4AenQAGEJhY2sgdG8gQ01UIExhbmRpbmcgUGFnZXBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHVxAH4AAAAAAAN1cQB+AAAAAAAIdXEAfgAAAAAAHHVxAH4AAAAAAAV1cQB+AAAAAAAHcQB+AF1wcQB+AbV0AB5hZGRFZGl0QXJ0aXN0UHJvcGVydHk6X2lkSnNwMTlzcQB+AHM/QAAAAAAADHcIAAAAEAAAAAFxAH4AeHEAfgB6eHBwc3EAfgCEcQB+AZ51cQB+AAAAAAACdAAgI3tsaXN0QXJ0aXN0UHJvcGVydGllc0JhY2tlci5nb31wcHEAfgB6dAAlQmFjayB0byBCcm93c2UgQXJ0aXN0IFByb3BlcnRpZXMgUGFnZXBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHBwcHh4cQB+AGk=" />

看的很晕.

web.xml中相关的配置为:
? <context-param>
??? <description>State saving method: "client" or "server" (= default)
??????????? See JSF Specification 2.5.3</description>
??? <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
??? <param-value>client</param-value>
? </context-param>

我怀疑这就是上面所说的"以隐藏域的方式存到浏览器上"的表现.

不过,我的疑问是:
?? ?1,先不说这个hidden variable有这么大,即使很小,那它有什么用?在提交时再传回Server上,还原出以前的状态么?
?? ?2,在什么情况下要用这个?与存在Server端比有什么优缺点?

1 楼 vieri122 2008-03-11  
   我的理解是:就象你用AJAX和不用AJAX一样的道理差不多. 在CLINET由浏览器去解释执行相关的操作,但安全性不一定可靠.(因为代码可见)而在SERVER端,由服务器容器去解释执行相关操作.安全性自然会好一些,可对服务器的要求就更高了.

以上是我个人的理解,不保证一定准确.待牛人来给出肯定的答复!
  相关解决方案