Dae galera… comecei ontem os meus estudos com jsf, dae ví que o Myfaces é uma implementação do JSf e o RichFaces uma biblioteca de componentes…, eu estou tentando integrar os dois mas quando coloco os jars do richfaces e defino ele no web.xml, simplesmente ele o servidor deixa de encontrar as paginas, dando eerro de pagina não encontrada…
Estou utilizando o eclipse e baixei o JBoosTools para me ajudar com o Richfaces… dae criei um projeto utilizando o Myface…
Segue o web.xml
[code]<?xml version="1.0"?>
JSFCRUD
State saving method: “client” or “server” (= default) See
JSF Specification 2.5.2
javax.faces.STATE_SAVING_METHOD
server
This parameter tells MyFaces if javascript code should be
allowed in the rendered HTML output. If javascript is
allowed, command_link anchors will have javascript code that
submits the corresponding form. If javascript is not
allowed, the state saving info and nested parameters will be
added as url parameters. Default: “true”
org.apache.myfaces.ALLOW_JAVASCRIPT
true
This parameter tells MyFaces if javascript code should be
allowed in the rendered HTML output. If javascript is
allowed, command_link anchors will have javascript code that
submits the corresponding form. If javascript is not
allowed, the state saving info and nested parameters will be
added as url parameters. Default: “false”
Setting this param to true should be combined with
STATE_SAVING_METHOD "server" for best results.
This is an EXPERIMENTAL feature. You also have to enable the
detector filter/filter mapping below to get JavaScript
detection working.
</description>
<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<description>
If true, rendered HTML code will be formatted, so that it is
"human readable". i.e. additional line separators and
whitespace will be written, that do not influence the HTML
code. Default: "true"
</description>
<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<description>
If true, a javascript function will be rendered that is able
to restore the former vertical scroll on every request.
Convenient feature if you have pages with long lists and you
do not want the browser page to always jump to the top if
you trigger a link or button action that stays on the same
page. Default: "false"
</description>
<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
<param-value>true</param-value>
</context-param>
<!-- Extensions Filter -->
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>
org.apache.myfaces.webapp.filter.ExtensionsFilter
</filter-class>
<init-param>
<description>
Set the size limit for uploaded files. Format: 10 - 10
bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB
</description>
<param-name>maxFileSize</param-name>
<param-value>20m</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<!-- Listener, that does all the startup work (configuration, init). -->
<listener>
<listener-class>
org.apache.myfaces.webapp.StartupServletContextListener
</listener-class>
</listener>
<!-- Faces Servlet -->
<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>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
org.richfaces.SKIN
blueSky
RichFaces Filter
richfaces
org.ajax4jsf.Filter
richfaces
Faces Servlet
REQUEST
FORWARD
INCLUDE
[/code]
As bibliotecas:
[code]commons-beanutils.jar
commons-codec.jar
commons-collections.jar
commons-digester.jar
commons-el.jar
commons-fileupload.jar
commons-lang.jar
commons-logging.jar
commons-validator.jar
jakarta-oro.jar
jstl.jar
log4j-1.2.8.jar
myfacesapi-1.1.4.jar
myfacesimpl-1.1.4.jar
portlet-api.jar
tomahawk.jar
richfaces-api-3.2.0.SR1.jar
richfaces-impl-3.2.0.SR1.jar
richfaces-ui-3.2.0.SR1.jar[/code]
No meu jsp eu utilizo assim… eu nem tinha criando nenhum componente utilizando o richfaces…
[code]<%@ taglib uri=“http://java.sun.com/jsf/html” prefix=“h”%>
<%@ taglib uri=“http://java.sun.com/jsf/core” prefix=“f”%>
<%@ taglib uri=“http://myfaces.apache.org/tomahawk” prefix=“t”%>
<%@ taglib uri=“http://richfaces.org/a4j” prefix=“a4j”%>
<%@ taglib uri=“http://richfaces.org/rich” prefix=“rich”%>
Eu já ví que tem bastante gente utilizando os dois em conjunto… como eu configuro os dois?
Abraço!