我无法正确设置我的应用程序文件表示欢迎妥善重定向到我home.xhtml 我试图内SO搜索,但我似乎无法使它work..sorry ..JSF欢迎文件没有正确重定向
在我的web.xml,我有这些
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
我的index.jsp有这样
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:c="http://java.sun.com/jsp/jstl/core">
<head>
<title>My App</title>
</head>
<body>
<c:redirect url="/faces/pages/home.xhtml"></c:redirect>
</body>
</html>
当我进入我的应用程序:
http://localhost:8080/myApp
我没有收到任何东西,也没有重定向。
什么可能是错的?
看看[这里](http://stackoverflow.com/questions/7416369/redirecting-using-jstl-core-redirect#answer-7416537)! ,我认为这是相同类型的问题。 – tartak