RICHFACES

10/04/2008

0

Pessoal, boa tarde!

Estou tentando usar RichFaces numa aplicação com Eclipse + Tomcat

Segui as instruções do Richfaces developer guide mas não obtive sucesso.

Meu arquivo JSP :

<¬@ taglib uri=´http://richfaces.org/rich´ prefix=´rich´¬>
<¬@ taglib uri=´http://java.sun.com/jsf/html´ prefix=´h´¬>
<¬@ taglib uri=´http://java.sun.com/jsf/core´ prefix=´f´¬>
<html>
<head>
<title>repeater </title>
</head>
<body>
<f:view>
<h:form>
<rich:panel header=´Simple Echo´>
<h:inputText size=´50´ value=´teste´ >
</h:inputText>
<h:outputText value=´ze´ id=´rep´/>
</rich:panel>
</h:form>
</f:view>
</body>
</html>


Meu arquivo 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>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>

</context-param>
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</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>*.faces</url-pattern>
</servlet-mapping>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
</web-app>


Quando rodo no eclipse recebo o seguinte resultado:

HTTP Status 404 - /Facility/teste2.faces

--------------------------------------------------------------------------------

type Status report

message /Facility/teste2.faces

description The requested resource (/Facility/teste2.faces) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/5.5.15


Isso ocorre também com os arquivos JSP que não utilizam RichFaces.


Se altero o web.xml para :

<?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´>

<!-- 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>*.faces</url-pattern>
</servlet-mapping>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
</web-app>

as páginas JSP sem Richfaces rodam normalmente e a com RichFaces me retorna :javax.servlet.ServletException: The absolute uri: http://richfaces.org/rich cannot be resolved in either web.xml or the jar files deployed with this application


Alguem pode me ajudar!


Grato,


Vlademir
Vasbahr

Vasbahr

Responder

Posts

16/09/2008

Rrobetti

Estou com o mesmo problema, quando resolver por favor avise... que se eu descobrir posto aki...

meu email rrobetti@gmail.com
Responder

30/10/2008

Wagner.gsantos

Vamos por partes, pq da segunda forma não funciona (apenas as paginas jsp sem richfaces) pq a servlet do richfaces não está configurada.

Aparentemente, o erro que vc descreveu está acontecendo pq sua aplicação na está subindo. Vi que vc praticamente copiou o web.xml do exemplo entao deveria funcionar. Dê uma olhada no stacktrace se tem algum erro na hora de levantar a aplicação e cole-o aqui.
Responder

Assista grátis a nossa aula inaugural

Assitir aula

Saiba por que programar é uma questão de
sobrevivência e como aprender sem riscos

Assistir agora

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar