On Tue, Apr 9, 2013 at 5:53 AM, maurojava <mauro2java2...@gmail.com> wrote:
> please you can send me a complete web.xml for get myfaces to work with > primesfaces ? > Below is part of my web.xml, which should be enough to get you started with PrimeFaces and TomEE. Please post any questions related to PrimeFaces on the PrimeFaces forums. <?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" 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-app_3_0.xsd"> <context-param> <param-name>javax.faces.PROJECT_STAGE</param-name> <param-value>Production</param-value> </context-param> <context-param> <param-name>com.sun.faces.allowTextChildren</param-name> <param-value>true</param-value> </context-param> <!-- http://code.google.com/p/omnifaces/issues/detail?id=73 Comment 25 by project member balusc, Today (11 minutes ago) Just keep GZIP filter threshold size default. It has not the same meaning as Facelets buffer size. A large Facelets buffer size may be useful during development, to spot any bugs in the view which causes exceptions during render response. But I would not set it that large in production. http://code.google.com/p/omnifaces/issues/detail?id=51 It's technically not possible to change the response when it has already been committed. So if an exception occurs during rendering the response and the response has already been committed, then you'll end up with a broken response. In most default servletcontainer/webapp configurations, the response get committed when 2KB has already been written to the response. One of the ways to avoid this is to increase the response buffer size. In Facelets, you can do this using the following context parameter (which sets it to 64KB, you may if necessary need to adjust it to the size of the largest HTML output you have): <context-param> <param-name>javax.faces.FACELETS_BUFFER_SIZE</param-name> <param-value>65535</param-value> </context-param> Setting to 800KB, since /orders/pf_Add.xhtml (640+ KB) is the largest view; if this is not set, then OmniFaces 1.2 (OmniPartialViewContext) breaks pf_BrowsePayroll.xhtml, see OmniFaces issue 73 (URL above) <context-param> <param-name>javax.faces.FACELETS_BUFFER_SIZE</param-name> <param-value>819200</param-value> </context-param> --> <context-param> <param-name>javax.faces.FACELETS_BUFFER_SIZE</param-name> <param-value>65535</param-value> </context-param> <context-param> <param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name> <param-value>true</param-value> </context-param> <!-- javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE See following URLS to explain why it might be of use: http://forum.primefaces.org/viewtopic.php?f=3&t=16701&start=10#p50972 http://forum.primefaces.org/viewtopic.php?f=3&t=16701#p50956 f:convertDateTime displays wrong Date; BalusC responded/answered http://stackoverflow.com/questions/2689245/fconvertdatetime-displays-wrong-date --> <context-param> <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>server</param-value> </context-param> <context-param> <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name> <param-value>true</param-value> </context-param> <!-- * http://myfaces.apache.org/core20/myfaces-impl/webconfig.html * http://wiki.apache.org/myfaces/Performance * * Per default settings, Mojarra does not serialize beans in the session. * MyFaces serialize it per default. You can also disable it in MyFaces * but i recommand to make all the stuff serializable because it would be * required if you would like to use session replication and clustering for example. * http://forum.primefaces.org/viewtopic.php?f=3&t=24157&start=10#p75383 * * * If you want to use JUEL, then copy JUEL JARs to tomee/lib, and copy the following * to outside of this comment. <context-param> <param-name>org.apache.myfaces.EL_RESOLVER_COMPARATOR</param-name> <param-value>org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator</param-value> </context-param> --> <context-param> <param-name>org.apache.myfaces.COMPRESS_STATE_IN_SESSION</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION</param-name> <param-value>10</param-value> </context-param> <context-param> <param-name>org.apache.myfaces.SERIALIZE_STATE_IN_SESSION</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL</param-name> <param-value>false</param-value> </context-param> <!-- Increase your JSF application performance (Part 1 - Environment & Configuration) http://tandraschko.blogspot.de/2012/08/increase-your-jsf-application.html --> <context-param> <param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name> <param-value>-1</param-value> </context-param> <context-param> <param-name>org.apache.myfaces.CHECK_ID_PRODUCTION_MODE</param-name> <param-value>false</param-value> </context-param> <context-param> <param-name>org.apache.myfaces.VIEW_UNIQUE_IDS_CACHE_ENABLED</param-name> <param-value>true</param-value> </context-param> <context-param> <param-name>org.apache.myfaces.SAVE_STATE_WITH_VISIT_TREE_ON_PSS</param-name> <param-value>false</param-value> </context-param> <!-- https://cwiki.apache.org/MYFACES/cache-el-expressions.html --> <context-param> <param-name>org.apache.myfaces.CACHE_EL_EXPRESSIONS</param-name> <param-value>always</param-value> </context-param> <context-param> <param-name>primefaces.THEME</param-name> <param-value>aristo</param-value> </context-param> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <!-- servlet-mapping url-pattern = *.jsf welcome-file = index.jsf Allows for the following: URL: http://localhost:8080/name-of-app-or-project/ URL: http://localhost:8080/name-of-app-or-project/index.jsf --> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.jsf</url-pattern> </servlet-mapping> <!-- session-timeout = 15 minutes --> <session-config> <session-timeout> 15 </session-timeout> </session-config> <welcome-file-list> <welcome-file>index.jsf</welcome-file> </welcome-file-list> </web-app>