AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

JSF-Datei als welcome-file

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Language (German)
View previous topic :: View next topic  
Author Message
Christian Helmbold
Guest





PostPosted: Sun May 06, 2007 8:59 pm    Post subject: JSF-Datei als welcome-file Reply with quote



Hallo,

wie kann man eine JSF-Datei als "welcome-file" verwenden?

Wenn ich in die web.xml

<welcome-file-list>
<welcome-file>welcomeJSF.jsf</welcome-file>
</welcome-file-list>

schreibe, zeigt der Application Server (Sun Java System AS) den
Verzeichnisinhalt, statt des Inhalts von welcomeJSF.jsp an. Laut Java EE
Tutorial [1] müsste es so gehen, wie oben steht:

"If a web container receives a valid partial request, the web container
examines the welcome ï¬le list and appends to the partial request each
welcome ï¬le in the order speciï¬ed and checks whether a static resource
or servlet in the WAR is mapped to that request URL. The web container
then sends the request to the ï¬rst resource in the WAR that matches."

Es würde also erst welcomeJSF.jsf an den URL angehängt und dann geguckt,
ob es eine statische Datei oder ein Servlet gibt, das darauf passt.

Den Trick mit <jsp:foward> kenne ich, aber ich will mir das gerne sparen
oder zumindest verstehen, warum es nicht so geht, wie ich mir das
vorstelle (obwohl es auch Beispiele im Netz gibt, die es so machen wie
ich es machen will).

Warum geht das nicht, so wie ich es versuche?

Gruß
Christian

[1] http://java.sun.com/javaee/5/docs/tutorial/doc/WebApp4.html#wp85892
Back to top
Bernd Eckenfels
Guest





PostPosted: Sun May 06, 2007 9:13 pm    Post subject: Re: JSF-Datei als welcome-file Reply with quote



Christian Helmbold <c.helmbold (AT) gmx (DOT) de> wrote:
Quote:
welcome-file-list
welcome-file>welcomeJSF.jsf</welcome-file
/welcome-file-list

schreibe, zeigt der Application Server (Sun Java System AS) den
Verzeichnisinhalt, statt des Inhalts von welcomeJSF.jsp an. Laut Java EE
Tutorial [1] müsste es so gehen, wie oben steht:

Zum glueck kenne ich mich mit jsf nicht aus, aber zuerst mal: was jetzt,
..jsf oder .jsp? Desweiteren, ruf doch einfach mal die url mit dem welcome
file dahinter auf, klappt das?

Quote:
Es würde also erst welcomeJSF.jsf an den URL angehängt und dann geguckt,
ob es eine statische Datei oder ein Servlet gibt, das darauf passt.

Und du hast ein servlet mapping auf *.jsf?

Gruss
Bernd
Back to top
Christian Helmbold
Guest





PostPosted: Mon May 07, 2007 2:34 am    Post subject: Re: JSF-Datei als welcome-file Reply with quote



Hallo Bernd,

Bernd Eckenfels schrieb:

Quote:
Zum glueck kenne ich mich mit jsf nicht aus, aber zuerst mal: was jetzt,
.jsf oder .jsp?

Ja, das ist auf den ersten Blick verwirrend. Bei JSF legt man Dateien
mit der Endung .jsp an, aber man ruft sie im Browser mit .jsf auf (oder
wie immer das Servlet-Mapping aussieht - es geht auch /faces/xy.jsp).

Quote:
Desweiteren, ruf doch einfach mal die url mit dem welcome
file dahinter auf, klappt das?

Genau das ist das Problem.

Quote:
Und du hast ein servlet mapping auf *.jsf?

Ja.

Gruß
Christian
Back to top
Thomas Wilhelmi
Guest





PostPosted: Mon May 07, 2007 7:13 am    Post subject: Re: JSF-Datei als welcome-file Reply with quote

Am Sun, 06 May 2007 17:59:38 +0200 schrieb Christian Helmbold:

Quote:
Wenn ich in die web.xml

welcome-file-list
welcome-file>welcomeJSF.jsf</welcome-file
/welcome-file-list

schreibe, zeigt der Application Server (Sun Java System AS) den
Verzeichnisinhalt, statt des Inhalts von welcomeJSF.jsp an. Laut Java EE
Tutorial [1] müsste es so gehen, wie oben steht:

Also ich habe in meiner web.xml (die auch funktioniert) folgendes stehen:

<welcome-file-list>
<welcome-file>faces/welcomeJSF.jsf</welcome-file>
</welcome-file-list>

Vielleicht ist das ja der kleine aber feine Unterschied? :-)

LG,
Willi
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Language (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.