RichFaces erro

9 respostas
victormenegusso

Quando tento executar o minha pagina que contem richfaces da o seguinte erro:

ERROR Cause: javax.portlet.PortletException: org.apache.jasper.JasperException: The absolute uri: http://richfaces.ajax4jsf.org/rich cannot be resolved in either web.xml or the jar files deployed with this application Message: org.apache.jasper.JasperException: The absolute uri: http://richfaces.ajax4jsf.org/rich cannot be resolved in either web.xml or the jar files deployed with this application StackTrace:

estou utilizando o eclipse, e eu ja adicionei as libs… tanto quando eu vejo a pre visualizacao aparece a Richfaces

9 Respostas

M

teu web.xml ta configurado direito?

victormenegusso

entao cara ja tentei deixar de duas maneiras meu web.xml
assim : que da o erro…

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5"
 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_2_5.xsd">
 <description>x</description>
 <display-name>testPortal</display-name>
 <welcome-file-list>
  <welcome-file>index.html</welcome-file>
  <welcome-file>index.htm</welcome-file>
  <welcome-file>index.jsp</welcome-file>
  <welcome-file>default.html</welcome-file>
  <welcome-file>default.htm</welcome-file>
  <welcome-file>default.jsp</welcome-file>
 </welcome-file-list>
 <login-config>
  <auth-method>BASIC</auth-method>
 </login-config>
</web-app>

e assim que ai nem aparece a pagina

<?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.5" 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_2_5.xsd"> <description></description> <display-name>jbossRichFacesWeb</display-name> <context-param> <param-name>org.richfaces.SKIN</param-name> <param-value>classic</param-value> </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> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> </servlet> <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>

eu nao sei oque estou fazendo de errado :cry:

M

Olha eu não lembro certo como configurar o web.xml pra JSF e RichFaces mas eu sei que o primeiro jeito ta errado.

Acho que no próprio site do richfaces tem uma explicação de como configurar, acho que tem algumas coisinhas erradas ai no teu segundo web.xml… vou procurar aqui se encontrar eu posto.

victormenegusso

tb fiz assim e nada… a pagina nao aparece

<?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.5" 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_2_5.xsd"> <description>x</description> <display-name>testPortal</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> <display-name>jbossRichFacesWeb</display-name> <context-param> <param-name>org.richfaces.SKIN</param-name> <param-value>classic</param-value> </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> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> </servlet> <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>

victormenegusso

markin1 vlw cara pela ajuda, vou dar uma procurada melhor tb

M

da uma olhada nessa página:
http://docs.jboss.org/richfaces/3.3.2.GA/en/devguide/html/GettingStarted.html

victormenegusso

vlw markin1 vou dar uma olhada

barcellosrod

Coloca a declaração das tuas taglibs na página ae para a galera ver…
Eu uso assim e funciona:
web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 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_2_5.xsd">
    <context-param>
      <param-name>com.sun.faces.verifyObjects</param-name>
      <param-value>true</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.DEFAULT_SUFFIX</param-name>
      <param-value>.xhtml</param-value>
    </context-param>
    <context-param>
      <param-name>facelets.DEVELOPMENT</param-name>
      <param-value>true</param-value>
    </context-param>
    <context-param>
      <param-name>facelets.SKIP_COMMENTS</param-name>
      <param-value>true</param-value>
    </context-param>
    <context-param>
      <param-name>org.richfaces.SKIN</param-name>
      <param-value>classic</param-value>
    </context-param>
    <context-param>
      <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name> 
      <param-value>com.sun.facelets.FaceletViewHandler</param-value> 
    </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>
    <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>
    <welcome-file-list>
	<welcome-file>
          index.html
      </welcome-file>
    </welcome-file-list>
</web-app>

Isso usando facelets

e a declaração na página fica assim:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:t="http://myfaces.apache.org/tomahawk"
      xmlns:rich="http://richfaces.org/rich">
	<body>	
		<ui:composition template="/templates/maintemplate.xhtml">	
			<ui:define name="content">
									 				      				
			</ui:define>   					
		</ui:composition>				                                                  								 				
	</body>
</html>

Ve se ajuda ae…

victormenegusso

Opa vou fazer os testes agora, cabei de chegar no trabalho, ja ja posto como declarei as taglibs… eu uso o Jboss portal + a IDE eclipse

Criado 12 de abril de 2010
Ultima resposta 13 de abr. de 2010
Respostas 9
Participantes 3