DPs de ler 300 tutorias e artigos sobre JSF, de ja decorar td, to tentando rodar uma aplicacao basica, tou seguindo este tutorial aqui:
http://guj.com.br/java.tutorial.artigo.192.1.guj
Seguinte, dps de configurar tudo direitinho, ate consegui fazer rodar a aplicacao, mas apenas no glassfish (tomcat dá erro) e qnd entro com a URL diretamente no index.jsp (http://localhost:8080/faces/index.jsp). Ou seja, se eu rodar essa bagaça na raiz do projeto, ele dá um erro de contexto e no tomcat dá erro de td jeito (pela raiz ou acessando o jsp diretamente). Contudo meu web.xml ta setado p apontar a pagina inicial p index.jsp e o resto ta configurado td blz, entao queria saber pq está dando esse erro de contexto tanto no glassfish qto no tomcat. grato a ajuda...
erro:
[IMG]http://img155.imageshack.us/img155/5053/duvidajsfam3.th.jpg[/IMG]
<?xml version="1.0" encoding="UTF-8" ?>
- <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>JSFnoBraco</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>
- <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>
- <context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</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>
</web-app>
<?xml version="1.0" encoding="UTF-8" ?>
- <faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xi="http://www.w3.org/2001/XInclude" 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-facesconfig_1_2.xsd">
- <managed-bean>
<managed-bean-name>loginBean</managed-bean-name>
<managed-bean-class>ssweb.bean.LoginBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
- <navigation-rule>
<from-view-id>/index.jsp</from-view-id>
- <navigation-case>
<from-outcome>sucesso</from-outcome>
<to-view-id>/painel.jsp</to-view-id>
</navigation-case>
- <navigation-case>
<from-outcome>falha</from-outcome>
<to-view-id>/index.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>
Ow negocinho dificil viu :(