🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.java
Article #141725

[JSF] Ustawianie Welcome page dla aplikacji

#141725
From: Yacho
Date: Thu, 16 Oct 2008 16:52
65 lines
3113 bytes
Witam !

Mam problem z podpięciem strony / pod /index.jsp
Serwer aplikacji to glassfish, JSF 1.2 RI.

moje faces config i web.xml jest nastepujace :

<?xml version="1.0" encoding="UTF-8"?>
<faces-config
     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-facesconfig_1_2.xsd"
     version="1.2">

       <navigation-rule>
             <display-name>index</display-name>
             <from-view-id>/index.jsp</from-view-id>
             <navigation-case>
                   <from-outcome>foo</from-outcome>
                   <to-view-id>/druga.jsp</to-view-id>
             </navigation-case>
       </navigation-rule>
  </faces-config>

<?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>tst1</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>index.faces</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>
</web-app>


Z tego co rozumiem zdefiniowanie najpierw :
<welcome-file>index.faces</welcome-file>
  a następnie mapowania .faces na serwlet JSF powinno działać... a nie 
dziala. Domyślam się że <welcome-file> powinno być rzeczywistm plikiem 
na serwerze a nie scieżka kontekstu - czy tak ?

Jeśli tak to jakie jest rozwiązanie mojego problemu ?

-- 
Jacek
Technical Details
Message-ID: <gd7rh3$psi$1@inews.gazeta.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.gazeta.pl!not-for-mail
From: Yacho <yacho1984@[googlemail].com>
Newsgroups: pl.comp.lang.java
Subject: [JSF] Ustawianie Welcome page dla aplikacji
Date: Thu, 16 Oct 2008 18:52:50 +0200
Organization: "Portal Gazeta.pl -> http://www.gazeta.pl"
Lines: 65
Message-ID: <gd7rh3$psi$1@inews.gazeta.pl>
NNTP-Posting-Host: chello089074165208.chello.pl
Mime-Version: 1.0
X-Trace: inews.gazeta.pl 1224175971 26514 89.74.165.208 (16 Oct 2008 16:52:51 GMT)
X-Complaints-To: usenet@agora.pl
NNTP-Posting-Date: Thu, 16 Oct 2008 16:52:51 +0000 (UTC)
X-User: yacho1984
X-Antivirus: avast! (VPS 081015-0, 2008-10-15), Outbound message
X-Antivirus-Status: Clean
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit