Ola pessoal, alguem sabe como mostar a url da pagina index ao iniciar o programa?
Estou usando JSF com Facelets porem quando inicializo minha aplicação é mostrdo na url : http://localhost:8082/frameworkFacelets/
e não carrega meus css,mas minha pagina abre normalmente , porem se eu colocar na URL: http://localhost:8082/frameworkFacelets/faces/index.xhtml na mão o css da pagina carrega normalmente, alguem ja teve esse tipo de problema, não acho nada na net, Tem como eu carregar a pagina inicial com a url inteira ? " URL: http://localhost:8082/frameworkFacelets/faces/index.xhtml"
Meu web.xml esta assim:
[code]<?xml version="1.0" encoding="UTF-8"?>
<description>Framework</description>
<display-name>Estratege Framework</display-name>
<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>
<filter>
<filter-name>MyFacesExtensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
<param-name>uploadMaxFileSize</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>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>*.faces</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>MyFacesExtensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</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>/faces/*</url-pattern>
</servlet-mapping>
com.sun.faces.verifyObjects
false
com.sun.faces.validateXml
true
javax.faces.STATE_SAVING_METHOD
server
javax.faces.DEFAULT_SUFFIX
.xhtml
facelets.DEVELOPMENT
false
facelets.SKIP_COMMENTS
true
<!--<context-param>
<param-name>org.ajax4jsf.SKIN</param-name>
<param-value>#{backSkin.skin}</param-value>
</context-param>-->
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/index.xhtml</welcome-file>
</welcome-file-list>
<error-page>
<error-code>500</error-code>
<location>/errorPage.jsp</location>
</error-page>
<mime-mapping>
<extension>html</extension>
<mime-type>text/html</mime-type>
</mime-mapping>
<mime-mapping>
<extension>txt</extension>
<mime-type>text/plain</mime-type>
</mime-mapping>
</web-app>
[/code]
Tempalte.xhtml
<?xml version='1.0' encoding='UTF-8' ?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="../css/rodape.css" rel="stylesheet" type="text/css" />
<link href="../css/top.css" rel="stylesheet" type="text/css" />
<link href="../css/conteudo.css" rel="stylesheet" type="text/css" />
<link href="../css/table.css" rel="stylesheet" type="text/css" />
<link href="../css/buttons.css" rel="stylesheet" type="text/css" />
<link href="../css/form.css" rel="stylesheet" type="text/css" />
<title>Facelets Template</title>
</head>
<body>
<!--Topo da pagina onde se encontra o baner e o menu-->
<div id="top">
<ui:include src="inc/topo.xhtml"/>
</div>
<!--Campo que representa o conteudo da pagina-->
<div id="content" class="body">
<br/><br/><br/>
<ui:insert name="cont">This is Default cout </ui:insert>
</div>
<!--Rodape da Pagina-->
<div id="bottom">
<ui:include src="inc/rodape.xhtml"/>
</div>
</body>
</html>
Index.xhtml
<?xml version='1.0' encoding='UTF-8' ?>
<!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:rich="http://richfaces.org/rich">
<body>
<div id="conteudo">
<ui:composition template="/newTemplate.xhtml">
<ui:define name="cont">
My Home Page
Clik no link para segunda pagina
<h:panelGrid>
<h:panelGrid columns="2" width="400"
headerClass="titulos">
<rich:simpleTogglePanel id="pic" switchType="client"
width="200" height="200"
label="Componentes Utilizados">
<ul>
<li>SQL Server 2000</li>
<li>Eclipselink</li>
<li>Facade</li>
<li>ConnectionFactory</li>
<li>Matriz e GenericBean</li>
<li>DAO e EntityManager</li>
<li>RichFaces da Seam JBoss</li>
</ul>
</rich:simpleTogglePanel>
<rich:simpleTogglePanel switchType="client"
width="200" height="200"
label="Padrões Utilizados">
<ul>
<li>JDBC</li>
<li>JPA</li>
<li>EJB</li>
<li>JDBC</li>
<li>Generics</li>
<li>Persistence</li>
<li>JSF</li>
</ul>
</rich:simpleTogglePanel>
</h:panelGrid>
</h:panelGrid>
</ui:define>
</ui:composition>
</div>
</body>
</html>
Tudo funciona perfeitamente somento o css nao carrega ao inicializar a aplicação(somente ao inicializar), se eu entrar em outra tela o css funciona e quando volto para a index ele funciona normalmente…
Tem como mostrar a url no quando sobe a aplicação???
Desde ja agradeço a atenção…