Configuracao Richfaces?

7 respostas
F

Estou comecando com richfaces e nao estou sabendo configura-lo.
estou usando richfaces-3.0.1 e ajax4jsf-1.1.1

mas qaundso tento subir no tomcat da eerro

SEVERE: Error filterStart

alguem msabe oq pode ser?ou se falta alguma lib,

Valeu Obrigado

7 Respostas

kleins

Você configurou seu web.xml ?

Segue o meu pra vc dar uma olhada.

No meu caso uso Myfaces + RichFaces + Ajax4jsf+ Tomahawk

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    
     <context-param>
        <param-name>org.ajax4jsf.SKIN</param-name>
        <param-value>ruby</param-value>
    </context-param>
    
    <context-param>
        <param-name>com.sun.faces.verifyObjects</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>
        <param-name>com.sun.faces.validateXml</param-name>
        <param-value>true</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</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>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
	<welcome-file>
            index.jsp
        </welcome-file>
    </welcome-file-list>
       <filter> 
  <display-name>Ajax4jsf Filter</display-name> 
  <filter-name>ajax4jsf</filter-name> 
  <filter-class>org.ajax4jsf.Filter</filter-class> 
 </filter> 
 <filter-mapping> 
  <filter-name>ajax4jsf</filter-name> 
   <servlet-name>Faces Servlet</servlet-name>
   <dispatcher>REQUEST</dispatcher>
   <dispatcher>FORWARD</dispatcher>
   <dispatcher>INCLUDE</dispatcher>
 </filter-mapping>
 <filter>
	<filter-name>MyFacesExtensionsFilter</filter-name>
	<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
    <init-param>
        <param-name>maxFileSize</param-name>
        <param-value>20m</param-value>
        <description>Set the size limit for uploaded files.
            Format: 10 - 10 bytes
                    10k - 10 KB
                    10m - 10 MB
                    1g - 1 GB
        </description>
    </init-param>
</filter>

<!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages  -->
<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>
</web-app>

Abraço

F

Cara vc podeira me Falar quais sao as libs para ropdar o richFaces???

Valeu

kleins

Vc precisa dos jars do ajax4jsf e do richfaces

Voc está usando a R.I da SUN ou o MyFaces ?

Este erro que está dando ai pra você é referente ao seu web.xml que não está devidamente configurado.

Posta pra gente o seu web.xml

Abraço.

Rodrigo

F

Segue o web.xml

<?xml version="1.0"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  
  <display-name>a4jEchoText</display-name>
  <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
  </context-param>
  
  <filter> 
	<display-name>Ajax4jsf Filter</display-name> 
	<filter-name>ajax4jsf</filter-name> 
	<filter-class>org.ajax4jsf.Filter</filter-class> 
  </filter> 
  
  <filter-mapping> 
    <filter-name>ajax4jsf</filter-name> 
	<servlet-name>Faces Servlet</servlet-name>
	<dispatcher>REQUEST</dispatcher>
	<dispatcher>FORWARD</dispatcher>
	<dispatcher>INCLUDE</dispatcher>
   </filter-mapping>
   <listener>
    <listener-class>
      com.sun.faces.config.ConfigureListener
    </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>
  
  <!-- Faces Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsf</url-pattern>
  </servlet-mapping>
  <login-config>
    <auth-method>BASIC</auth-method>
  </login-config>
</web-app>

o sera q esta errado???

kleins

Aparentemente não vi erro.

Ele está lançando qual classe na Exception quando dá o erro ?

F

o codigo de erro é :

INFO: Illegal access: this web application instance has been stopped already. Could not load java.lang.Object. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
java.lang.IllegalStateException

lessandronp

esse erro estava acontecendo no meu porque no web.xml estava assim:

<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/app/</url-pattern>
<url-pattern>
.jsf</url-pattern>
</servlet-mapping>

daí eu separei as urls patterns do mapeamento do servlet, ficando assim:

<!-- Faces Servlet Mapping -->
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/app/*</url-pattern>
</servlet-mapping>

&lt;servlet-mapping&gt;
    &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
    &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
&lt;/servlet-mapping&gt;

Abraços,
Att,
Lessandro

Criado 17 de agosto de 2007
Ultima resposta 29 de jan. de 2009
Respostas 7
Participantes 3