proof of concept for multiple clients in JSF 2.0

让人想犯罪 __ 提交于 2019-12-11 17:57:34

问题


I have to implement a Proof of concept for multi client handling in JSF 2.0. How can multiple clients be handled in jsf?


回答1:


Just do not store request or session scoped data in a managed bean which is placed in the application scope. Also just do not declare the properties of a request or session scoped bean which is supposed to live as long as the bean itself as static.

It's under the hoods not different from the basic Servlet API.




回答2:


JSF 2.0 helps you to provide a way to create user interfaces and has some built-in annotations for handle scopes like request, session or application. In simple scenarios use request, view, flash and session scope could work for you. But if you need something more elaborated take a look at MyFaces Orchestra which provide the well known conversation scope (requires spring) or even better take a look at MyFaces CODI, which provide you things like bean validation, scripting, window scope, and much more!. Use CODI is the best for new JSF web applications, because follows the standard for CDI - JSR 299, and provide you some useful goodies.

The best way to start with CODI is look on MyFaces CODI Wiki and you can also ask question on MyFaces Users and Dev Mailing lists.



来源:https://stackoverflow.com/questions/6482033/proof-of-concept-for-multiple-clients-in-jsf-2-0

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!