You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by maurojava <ma...@gmail.com> on 2013/04/08 17:58:38 UTC

config web.xml myfaces for use with primefaces

hi all.
Hi not understand what oaram i have to set int oweb.xml for work myfaces
with primefaces.

Please i have tried with tomee that as out.of-the box myfaces like
implementation of JSF2 .

But i have use primefaces components with it.

Primefaces it use ajax for partial process of page.

I have read at 
http://myfaces.apache.org/core21/myfaces-impl/webconfig.html

http://myfaces.apache.org/core20/myfaces-impl/webconfig.html

https://cwiki.apache.org/confluence/display/MYFACES/Configuration+of+special+features

but i not understand what i have to set .
I use also openwebbeans for the managedbean with cdi.

Mauro




--
View this message in context: http://myfaces.10567.n7.nabble.com/config-web-xml-myfaces-for-use-with-primefaces-tp114536.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Re: config web.xml myfaces for use with primefaces

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
On Mon, Apr 8, 2013 at 12:52 PM, José Luis Cetina <ma...@gmail.com>wrote:

> This question, is not specific of Primefaces.
>
> If you want to use Java Server Faces, set this in your web.xml
>
> <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>
>         <servlet-name>Faces Servlet</servlet-name>
>         <!-- HERE YOU CAN SET YOU JSF FILE EXTENSION-->
>         <url-pattern>*.xhtml</url-pattern>
>     </servlet-mapping>
>
>
Nice response, Jose!

also, since you are using MyFaces and OpenWebBeans/CDI, please click URL
below and do what is recommended there, to improve performance of your Java
Server Faces (JSF) web app.


Increase your JSF application performance (Part 1 - Environment &
Configuration) [1]

Increase your JSF application performance (Part 2 - Design Patterns) [2]

JSF, Facelets, Myfaces and Richfaces Performance Tuning [3]

And last but not least, consider TomEE [4], which bundles myfaces +
OpenWebBeans, and Jose' and I both are using  TomEE + PrimeFaces. :)


[1]
http://tandraschko.blogspot.de/2012/08/increase-your-jsf-application.html
[2]
http://tandraschko.blogspot.de/2012/09/increase-your-jsf-application.html
[3] http://blog.eisele.net/2009/10/jsf-facelets-myfaces-and-richfaces.html
[4] http://tomee.apache.org/apache-tomee.html

Re: config web.xml myfaces for use with primefaces

Posted by Romain Manni-Bucau <rm...@gmail.com>.
here is an app using pf in tomee (not sure about tomee versions since it is
now a bit old so maybe it is no more up to date but the conf didnt change):
https://github.com/rmannibucau/agoncal-application-petstore-ee6

here is the web.xml:
https://github.com/rmannibucau/agoncal-application-petstore-ee6/blob/master/src/main/webapp/WEB-INF/web.xml

*Romain Manni-Bucau*
*Twitter: @rmannibucau <https://twitter.com/rmannibucau>*
*Blog: **http://rmannibucau.wordpress.com/*<http://rmannibucau.wordpress.com/>
*LinkedIn: **http://fr.linkedin.com/in/rmannibucau*
*Github: https://github.com/rmannibucau*



2013/4/9 maurojava <ma...@gmail.com>

> please you can send me a complete web.xml for get myfaces to work with
> primesfaces ?
> and with rich faces?
>
> tank you very much
>
> mauro
>
>
>
>
> --
> View this message in context:
> http://myfaces.10567.n7.nabble.com/config-web-xml-myfaces-for-use-with-primefaces-tp114536p114544.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>

Re: config web.xml myfaces for use with primefaces

Posted by maurojava <ma...@gmail.com>.
Tank you for response.
I have tried but when add some of your param into wrb.xml i get a flag of
error into netbeans.
For many param not work with myfaces.
 Il giorno 09/apr/2013 20.01, "Howard W. Smith, Jr. [via MyFaces]" <
ml-node+s10567n114548h28@n7.nabble.com> ha scritto:

> On Tue, Apr 9, 2013 at 5:53 AM, maurojava <[hidden email]<http://user/SendEmail.jtp?type=node&node=114548&i=0>>
> 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>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://myfaces.10567.n7.nabble.com/config-web-xml-myfaces-for-use-with-primefaces-tp114536p114548.html
>  To unsubscribe from config web.xml myfaces for use with primefaces, click
> here<http://myfaces.10567.n7.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=114536&code=bWF1cm8yamF2YTIwMTFAZ21haWwuY29tfDExNDUzNnwtMTExNzE4NzYyNQ==>
> .
> NAML<http://myfaces.10567.n7.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://myfaces.10567.n7.nabble.com/config-web-xml-myfaces-for-use-with-primefaces-tp114536p114552.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Re: config web.xml myfaces for use with primefaces

Posted by "Howard W. Smith, Jr." <sm...@gmail.com>.
On Tue, Apr 9, 2013 at 5:53 AM, maurojava <ma...@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>

Re: config web.xml myfaces for use with primefaces

Posted by maurojava <ma...@gmail.com>.
please you can send me a complete web.xml for get myfaces to work with
primesfaces ? 
and with rich faces?

tank you very much

mauro




--
View this message in context: http://myfaces.10567.n7.nabble.com/config-web-xml-myfaces-for-use-with-primefaces-tp114536p114544.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Re: config web.xml myfaces for use with primefaces

Posted by Gerhard Petracek <ge...@gmail.com>.
hi,

@ #1:
it shouldn't be needed (myfaces-core is doing it automatically).
if you have issues after removing it, please report it to the team of tomee.

regards,
gerhard



http://www.irian.at

Your JSF/JavaEE powerhouse -
JavaEE Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


2013/4/9 Thomas Andraschko <an...@gmail.com>

> 1) it's necessary
> 2) Just use google... It's a EL Implementation
>
>
> 2013/4/8 maurojava <ma...@gmail.com>
>
> > tank you for your response.
> > When i create a new project with netbeans 7.3 and tomee server, and i add
> > the JSF framework, i get automatically into web.xml the following
> > configuration for myfaces:
> >
> > <listener>
> >
> >
> >
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> >     </listener>
> >     <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>
> >         <servlet-name>Faces Servlet</servlet-name>
> >         <url-pattern>*.jsf</url-pattern>
> >     </servlet-mapping>
> >
> > from your response not says over <listener>
> >
> >
> >
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> >     </listener>
> >
> >
> > it is necessaries?
> >
> > what  it is the work of the <listener>
> >
> >
> >
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
> >     </listener>
> > at startup of my web application??
> >
> >
> > 2)Other questions:
> > from the link:
> >
> http://tandraschko.blogspot.de/2012/08/increase-your-jsf-application.html
> >
> > i read :
> >
> > Use JUEL as EL implementation
> >
> >     Add the newest JUEL API + implementation as depedency
> >     Configure MyFaces to use JUEL:
> >
> >
> >     <context-param>
> >
> <param-name>org.apache.myfaces.EXPRESSION_FACTORY</param-name>
> >
> <param-value>de.odysseus.el.ExpressionFactoryImpl</param-value>
> >     </context-param>
> >
> > Increase expression cache in JUEL
> >
> >     Create src/main/resources/el.properties
> >     Add property javax.el.cacheSize with a custom size. The default size
> is
> > 1000. In my application i use a size of 3000.
> >
> > DO i can download the JUEL ? it is from myfaces core???
> > -----------------------------------------------------------
> > If you use CDI, consider to use OpenWebBeans as implementation and
> > configure
> > this in your web.xml:
> >
> >
> > <context-param>
> >     <param-name>org.apache.myfaces.EL_RESOLVER_COMPARATOR</param-name>
> >
> >
> >
> <param-value>org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator</param-value>
> > </context-param>
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://myfaces.10567.n7.nabble.com/config-web-xml-myfaces-for-use-with-primefaces-tp114536p114539.html
> > Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >
>

Re: config web.xml myfaces for use with primefaces

Posted by Thomas Andraschko <an...@gmail.com>.
1) it's necessary
2) Just use google... It's a EL Implementation


2013/4/8 maurojava <ma...@gmail.com>

> tank you for your response.
> When i create a new project with netbeans 7.3 and tomee server, and i add
> the JSF framework, i get automatically into web.xml the following
> configuration for myfaces:
>
> <listener>
>
>
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>     </listener>
>     <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>
>         <servlet-name>Faces Servlet</servlet-name>
>         <url-pattern>*.jsf</url-pattern>
>     </servlet-mapping>
>
> from your response not says over <listener>
>
>
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>     </listener>
>
>
> it is necessaries?
>
> what  it is the work of the <listener>
>
>
> <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
>     </listener>
> at startup of my web application??
>
>
> 2)Other questions:
> from the link:
> http://tandraschko.blogspot.de/2012/08/increase-your-jsf-application.html
>
> i read :
>
> Use JUEL as EL implementation
>
>     Add the newest JUEL API + implementation as depedency
>     Configure MyFaces to use JUEL:
>
>
>     <context-param>
>             <param-name>org.apache.myfaces.EXPRESSION_FACTORY</param-name>
>             <param-value>de.odysseus.el.ExpressionFactoryImpl</param-value>
>     </context-param>
>
> Increase expression cache in JUEL
>
>     Create src/main/resources/el.properties
>     Add property javax.el.cacheSize with a custom size. The default size is
> 1000. In my application i use a size of 3000.
>
> DO i can download the JUEL ? it is from myfaces core???
> -----------------------------------------------------------
> If you use CDI, consider to use OpenWebBeans as implementation and
> configure
> this in your web.xml:
>
>
> <context-param>
>     <param-name>org.apache.myfaces.EL_RESOLVER_COMPARATOR</param-name>
>
>
> <param-value>org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator</param-value>
> </context-param>
>
>
>
>
> --
> View this message in context:
> http://myfaces.10567.n7.nabble.com/config-web-xml-myfaces-for-use-with-primefaces-tp114536p114539.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>

Re: config web.xml myfaces for use with primefaces

Posted by maurojava <ma...@gmail.com>.
tank you for your response.
When i create a new project with netbeans 7.3 and tomee server, and i add
the JSF framework, i get automatically into web.xml the following
configuration for myfaces:

<listener>
       
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener>
    <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>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>

from your response not says over <listener>
       
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener>


it is necessaries?

what  it is the work of the <listener>
       
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
    </listener>
at startup of my web application??


2)Other questions:
from the link:
http://tandraschko.blogspot.de/2012/08/increase-your-jsf-application.html

i read :

Use JUEL as EL implementation 

    Add the newest JUEL API + implementation as depedency
    Configure MyFaces to use JUEL:
   
    	
    <context-param>
            <param-name>org.apache.myfaces.EXPRESSION_FACTORY</param-name>
            <param-value>de.odysseus.el.ExpressionFactoryImpl</param-value>
    </context-param>

Increase expression cache in JUEL

    Create src/main/resources/el.properties
    Add property javax.el.cacheSize with a custom size. The default size is
1000. In my application i use a size of 3000.

DO i can download the JUEL ? it is from myfaces core???
-----------------------------------------------------------
If you use CDI, consider to use OpenWebBeans as implementation and configure
this in your web.xml:

	
<context-param>
    <param-name>org.apache.myfaces.EL_RESOLVER_COMPARATOR</param-name>
   
<param-value>org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator</param-value>
</context-param>




--
View this message in context: http://myfaces.10567.n7.nabble.com/config-web-xml-myfaces-for-use-with-primefaces-tp114536p114539.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Re: config web.xml myfaces for use with primefaces

Posted by José Luis Cetina <ma...@gmail.com>.
This question, is not specific of Primefaces.

If you want to use Java Server Faces, set this in your web.xml

<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>
        <servlet-name>Faces Servlet</servlet-name>
        <!-- HERE YOU CAN SET YOU JSF FILE EXTENSION-->
        <url-pattern>*.xhtml</url-pattern>
    </servlet-mapping>


2013/4/8 maurojava <ma...@gmail.com>

> hi all.
> Hi not understand what oaram i have to set int oweb.xml for work myfaces
> with primefaces.
>
> Please i have tried with tomee that as out.of-the box myfaces like
> implementation of JSF2 .
>
> But i have use primefaces components with it.
>
> Primefaces it use ajax for partial process of page.
>
> I have read at
> http://myfaces.apache.org/core21/myfaces-impl/webconfig.html
>
> http://myfaces.apache.org/core20/myfaces-impl/webconfig.html
>
>
> https://cwiki.apache.org/confluence/display/MYFACES/Configuration+of+special+features
>
> but i not understand what i have to set .
> I use also openwebbeans for the managedbean with cdi.
>
> Mauro
>
>
>
>
> --
> View this message in context:
> http://myfaces.10567.n7.nabble.com/config-web-xml-myfaces-for-use-with-primefaces-tp114536.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>



-- 
-------------------------------------------------------------------
*SCJA. José Luis Cetina*
-------------------------------------------------------------------