2012-11-10 27 views
0

我要发布一些示例的Java EE与欢迎文件服务器: 我觉得404 http://kitchensink-justexample.rhcloud.com/ 但我可以访问http://kitchensink-justexample.rhcloud.com/index.jsf 我在我的web.xml中编写欢迎文件列表,但似乎不起作用。的Java EE我写有欢迎文件列表在web.xml中的代码,但不影响

我的web.xml是:

<?xml version="1.0" encoding="UTF-8"?> 
<web-app version="3.0" 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_3_0.xsd"> 


<context-param> 
    <param-name>javax.faces.PROJECT_STAGE</param-name> 
    <param-value>Development</param-value> 
</context-param> 

<!-- Activate the JSF 2.0 servlet --> 
<servlet> 
    <servlet-name>Faces Servlet</servlet-name> 
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> 
    <load-on-startup>1</load-on-startup> 
</servlet> 

<!-- Tell the context which URLs to process with JSF --> 
<servlet-mapping> 
    <servlet-name>Faces Servlet</servlet-name> 
    <url-pattern>*.jsf</url-pattern> 
</servlet-mapping> 


<welcome-file-list> 

    <welcome-file>index.jsf</welcome-file> 
</welcome-file-list> 
</web-app> 

如何使WELCOM文件列表的工作。

回答

0

我以前没有用过jsf。但是,我认为这种行为的原因是你指定了url模式为* .jsf,并且你尝试的第一个url不符合这种模式。