【发布时间】:2014-05-22 07:41:35
【问题描述】:
我开始使用 JSF,我有点迷茫。我正在开发一个 JSF 应用程序,我有两个输入点。
有时我需要我的浏览器打开一个名为 mydata.xhtml 的页面,有时我需要打开一个名为 dataexchange.xhtml 的页面。
现在我已经完成了第一个,并且应用程序运行良好。我想我必须更改我的 web.xml 文件,不是吗?
我的 web.xml 是这个。
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd">
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<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>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/mydata.xhtml</welcome-file>
</welcome-file-list>
</web-app></pre>
【问题讨论】:
标签: java xml jsf jsf-2 web.xml